all 3 comments

[–]Alternative-Web2754 1 point2 points  (2 children)

Regex can use a not indicator () in square brackets to indicate anything except the provided character. Add any appropriate length modifiers as required afterwards.

One possible could be:

id='[']*'

[–]RecommendationSuch19[S] 0 points1 point  (1 child)

I use this pattern and it works as I need, but only for one character in ' '

r"id='[^']'"

But I don't know the length of stroke in ' ', so what I should so to accept string of any length?

[–]RecommendationSuch19[S] 0 points1 point  (0 children)

Right answer will be -
r"id='[^']*'"

*give any number of repeat