0
How do I stop regular expression from capturing what it has \} in the text? I want you to get all the }, but I want if it’s escaped with the character to be discarded, not ignored.
I’m trying that expression: [^\\]} but it returns a character before the }...
Summary: If you have the character \ before the }, disposal the capture.
I don’t know on . Net, but on pcre, this works:
{(.*[^\\])}– Vinícius Gobbo A. de Oliveira
This one is capturing the field {...} whole... I just want you to capture the } other than }...
– CypherPotato
Got it wrong. This expression works on Pcre (if I’ve got it right this time...):
(?<!\\)(})– Vinícius Gobbo A. de Oliveira
Thanks @Viníciusgobboa.deOliveira, it worked!
– CypherPotato