Answer the question
In order to leave comments, you need to log in
How to use regular expressions to write "x" occurs more than 1 time in a row?
That is, so that the file with the name - site.com-1200x1600_67bd2cbd2fe26eab9480356a35c80eb9-1152x1536 matches the regular expression, and the file with the name - site.com-1200x1600_67bd2cbd2fe26eab9480356a35c80eb9 does not.
Answer the question
In order to leave comments, you need to log in
x[^x].*x
- like this
Under the same rule, it’s better to compose it so
if the resolution occurs twice
[0-9]+x[0-9]+.+[0-9]+x[0-9]+
[0-9]+x
- the numbers are 1 time and more
if the whole line
https://regex101.com/r/jJenlF/1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question