简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM