Answer the question
In order to leave comments, you need to log in
Regular expression to search for {text} but ignore {{text}}?
Good afternoon, I can’t compose a regular expression that will search in the text:
{text}, but ignore {{text}} {{{text}}} and so on, you only need 1 bracket around the edges.
Now my regex is this:
{(\w+)}
But the problem is that it finds an extra
one. How to exclude from the selection cases when there are more brackets than specified?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question