RegExp#execis used instead of
String#matchif no global flag is provided
RegExp#exec is faster than
String#match and both work the same when not using the
📖 Rule Details
This rule is aimed at enforcing the more performant way of applying regular expressions on strings.
This rule inspired by @typescript-eslint/prefer-regexp-exec rule.
📚 Further reading
This rule was introduced in eslint-plugin-regexp v0.3.0