Regex syntax error
Issue #826
resolved
Hi, monit 5.25.1 give me an error with this regular expression:
if content = (?<=dup=)([1-9]{3,}) then restart
I search for: co located POCs unavailablee=00:00:12.67 bitrate=N/A dup=123 drop=80 speed=0.899x
https://regex101.com/r/0M6qEF/2
The error is:
"syntax error '[1-9]'"
What is missing?
Comments (2)
-
-
repo owner - changed status to resolved
- Log in to comment
Two problems here:
if content = "(?<=dup=)([1-9]{3,})" then restart
So a finally working version would be:
I removed the capturing group since there is no place to use it... Keep in mind that you are not matching a
0
here. Comparing with your regex101-link, it might be more like (this is only matching numbers >= 100)