Reputation: 1318
Is there a way in Sublime Text to execute multiple regular expression search and replace queries at once.
For example I want to (in the order listed)
At once.
The string: "blah regex1, bloo regex2, bleep regex3" Would become : "blah regex1replacement, bloo regex2replacement, bleep regex3replacement"
This is something that can be easily scripted, but I currently don't have that freedom.
Upvotes: 0
Views: 405
Reputation: 27247
edit: Oh sorry I missed that you want this in sublime text. Sorry!
sed 's/regex1/regex1replacement/g;s/regex2/regex2replacement/g;s/regex3/regex3replacement/g;'
For a cleaner script, I think this will work, but I haven't tested:
sed "s/regex1/regex1replacement/g; \
s/regex2/regex2replacement/g; \
s/regex3/regex3replacement/g;"
Upvotes: 1