I do a lot of programming in Ruby, and a common edit suggested by Rubocop (a linter) is to reformat an array of symbols
[:foo, :bar, :baz]
as a percent string:
%i[foo bar baz]
I'm looking for a quick way to remove all colons and commas between the brackets without affecting text on the same line outside the brackets.
Is there any way to specify a search query that will ignore matches outside of a given set of delimiters? I tried tossing the delimiters into the search query, but any way I can think of to structure the regular expression winds up consuming the other matches.