Page 1 of 1

RegEx to find {} chars

Posted: Wed Feb 05, 2014 10:11 pm
by Doc Dawg
I really like TextCrawler but I'm having trouble with a particular regex to find a CSS class. The problem is getting it to detect the brace characters. I need to find them so that I can replace the class attributes with modified ones in a backreference.

For example, I can find any one of these:

.my-class
\{
\}

But not the combination:

.my-class
\{

TextCrawler appears to ignore the escaped brace instead of treating it literally. Any ideas?

Re: RegEx to find {} chars

Posted: Thu Feb 06, 2014 10:49 am
by DigitalVolcano
Is the regex over more that one line in the editor (i.e you used the pop-up multi line editor)?

In this case the program is ignoring the line break so not matching your text - you need to turn off the Regular Expression->Indented RegEx option in the 'Options' Window

Hope this helps