/g global flag applied to all regex without option to disable
Closed this issue · 3 comments
Describe the bug
regex filter applies /g if not requested
Version
v0.48.01
How did you install?
docker
To Reproduce
Steps to reproduce the behaviour:
Trying to extract the top tag from a git tags page e.g - https://github.com/nextcloud/server/tags
the regex /(.*v\d.*)/i
should return one match v30.0.3rc2
without the global flag
however 10 matches are being returned
tested @ https://regexr.com/
Hmm thats not quite how it works, its testing the regex against every line in the page, line by line (of text)
"Extracts text in the final output (line by line) after other filters using regular expressions or string match;
"
so question is, how to just get the first result hmm
I am losing my mind, I cleared all history and ran the check again and now it's playing nice, I am using /\s\sv(\d.+)(?s:.*)/i
in order to just grab the 1st entry, apologies for wasting your time, all is well :)