Answer the question
In order to leave comments, you need to log in
How to allow only alphanumeric in {}?
There is an expression that matches only what is in curly brackets: [^{}]+(?=})
How to remake this expression so that only alphanumeric matches in curly brackets, and not everything in general?
upd: I changed the expression for golang, because the expression above did not work for it
now like this:
(?s){(.*?)}
now two questions:
1. How can only alphanumeric be allowed inside curly braces?
2. How to remove curly braces from matching? So that only what is inside them matches? (as in the expression at the very beginning of the question)
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