coloredcobra icon indicating copy to clipboard operation
coloredcobra copied to clipboard

Regex to detect flags can be improved

Open kovidgoyal opened this issue 3 years ago • 0 comments

Currently the regex is (--?\S+) this will incorrectly match words like if-available. Changing it to \s+(--?\S+) will prevent that. Although the ideal solution is to of course iterate over all flags and build up a regex from that list.

kovidgoyal avatar Aug 13 '22 10:08 kovidgoyal