Highlight everything between quotes in Sublime Text 2
In this example, I want to change all classes within a list item:
<li class="some-string">
Within Sublime Text 2 we can employ the following regular expression to attack to this:
([""'])(?:(?=(\\?))\2.)*?\1
- ⌘F (Control + F for PC)
- Activate regular expressions by looking for .* button (bottom left)
- Type class=([""'])(?:(?=(\?))\2.)*?\1>
- ⌥⏎ (option or alt + return)
Written by &y
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sublime text 2
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#