Page 1 of 1

How to use "or" in content?

Posted: Mon Dec 27, 2021 7:09 am
by wu_yi
I want to find a file that contains either five or six digits,use:regex:content:<\b[0-9{5}\b|\b[0-9{6}\b>
show The syntax is incorrect

Re: How to use "or" in content?

Posted: Mon Dec 27, 2021 7:12 am
by void
Please escape | with double quotes ("), otherwise Everything will treat | as the OR operator:

regex:content:"\b\d{5}\b|\b\d{6}\b"

-or-

regex:content:\b\d{5,6}\b



PCRE Repetition