RegEx to find {} chars

Tool for Search and Replace across multiple files.
Post Reply
Doc Dawg
Posts: 1
Joined: Wed Feb 05, 2014 9:59 pm

RegEx to find {} chars

Post 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?
User avatar
DigitalVolcano
Site Admin
Posts: 1729
Joined: Thu Jun 09, 2011 10:04 am

Re: RegEx to find {} chars

Post 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
Post Reply