Namanyay Goel
Namanyay Goel

Reputation: 2710

Search and replace using a regex in Sublime Text

How to do a search and replace with Sublime Text, so it finds "(wildcard)"?

I want to do a simple find and replace to get curly quotes, I expect that this can be done using regex.

Thanks :)

Upvotes: 2

Views: 3081

Answers (1)

Andrew Cheong
Andrew Cheong

Reputation: 30303

If you're looking to make curly quotes into straight quotes, then can you just replace , , , and with ", ', ", and ', respectively? But maybe that is not your aim. You should be able to use the curly quotes "literally" in your regex, e.g.

“(.*?)”

EDIT:

Ah, so you want to convert straight quotes to curly quotes. In that case, try replacing

"([^"]*)"

with

“$1”

Upvotes: 4

Related Questions