thednp
thednp

Reputation: 4479

Regex: replace anything and inside quotes

I'm trying to do a find/replace with my code editor for the font icons' PUA generated codes. The reason why I ask is because the string contains backspace escape and have no idea how to write it.

Example: content: "\e034" to be content:.

Thanks for your time

Upvotes: 0

Views: 241

Answers (1)

Wiktor Stribiżew
Wiktor Stribiżew

Reputation: 626926

In order to match something between delimiters you do not need to know what is inside. Just leave the job to the negated character class:

content:\s"[^"]*"

The [^"] is a negated character class matching any character other than a double quote.

Replace with content:.

See demo

Upvotes: 1

Related Questions