Mohsen
Mohsen

Reputation: 65825

Find in Sublime Text 2: how to make sublime text search for double quotes when I use find with quote and vise versa

I have a JavaScrip document that is very long. I need to find strings that come before or after specific pattern, but I don't know if author of document used single quote (') or double quote (") for strings. So I have to repeat my search every time.

Can I make Sublime Text ignore double or single quote and search for all matching patterns?

Upvotes: 3

Views: 1583

Answers (1)

garyh
garyh

Reputation: 2852

Turn on Regular Expressions with Alt+R, then type the following into the search field:

["'](String To Find)["']

The brackets surrounding your String To Find will allow you to reference the matched string with \1

Upvotes: 4

Related Questions