Answer the question
In order to leave comments, you need to log in
Regular expression. How to catch a substring?
Guys, I'll ask for help with the compilation of the regular season.
Examples:
hello-blocked.svg
helloworld-blocked.svg
other.svg
Match (.svg) should only catch other.svg
Regular should catch a match in .svg only for anyname.svg
And shouldn't catch any line if at the end of it there is an expression -blocked.svg
Answer the question
In order to leave comments, you need to log in
what programming language? if js then
/^(?!.*-blocked.svg$).*\.svg$/
Here is another option, in my opinion the easiest.
https://regex101.com/r/yhD3Av/1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question