Home Download Buy Blog Forum Support

GREP search/replace question, is this possible with ST2

GREP search/replace question, is this possible with ST2

Postby handycam on Wed Oct 10, 2012 1:23 pm

I have many tags like this:
Code: Select all
<td colspan="2" align="LEFT">
where someone has put some attributes in uppercase.

Can ST2 find all instances of ANY text in uppercase and make it lowercase?

I seem to remember Textmate having a switch to insert the replaced text as lowercase, but I forget what it is and if ST2 has the same functionality.

Thanks.
Mac OS 10.8.5
ST 3 (3053)
handycam
 
Posts: 269
Joined: Tue Jan 03, 2012 2:42 pm

Re: GREP search/replace question, is this possible with ST2

Postby adzenith on Wed Oct 10, 2012 4:45 pm

Sublime Text 2 supports regular expressions, and those can change the case of letters:
https://www.google.com/search?btnG=1&pw ... ase+change
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: GREP search/replace question, is this possible with ST2

Postby vitaLee on Wed Oct 10, 2012 9:26 pm

@adzenith good to know. thanks for sharing
@handycam to answer your question try something between the lines of
Code: Select all
find: (<[^>]*>)
replace: \L$1\E
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: GREP search/replace question, is this possible with ST2

Postby handycam on Fri Oct 12, 2012 1:07 pm

vitaLee wrote:@adzenith good to know. thanks for sharing
@handycam to answer your question try something between the lines of
Code: Select all
find: (<[^>]*>)
replace: \L$1\E


Yes, that did it, thank you
Mac OS 10.8.5
ST 3 (3053)
handycam
 
Posts: 269
Joined: Tue Jan 03, 2012 2:42 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 18 guests