#match? is for when you only care that there is a match, #match for when you actually want to do something with it. Which is hard to detect in a find-replace-batch because the MatchData might be used elsewhere, without an obvious assigment or passing around of variables.
They have different usecases. And unless you are 100% sure all your usage of #match fit in the "only check if it is matching, never using the matched data" you cannot do a search-replace.
2
u/ilmari2k Jul 20 '16
The regexp match might yield some performance benefits if done multiple times inside a large loop for example. Is it find/replaceable?