Regex for Multiple Deny Selection -
i new regex world. have been using regex while today found problem couldn't resolve. searched forum got no luck.
i have negative match. have match tables eos.1
, eos.2
there eos.9000
tables. not consecutive, have leave behind tables 90
, 91
, 2293
, 3750
, etc.
i tried pattern:
eos\.(?!91|90|2300|2504|3747|3750|100|3788|2303|2304|2293)
however, matches eos.
part, not numbers.
thank much.
you may use below regex:
\beos\.(?!(91|90|2300|2504|3747|3750|100|3788|2303|2304|2293)\b)(?:[1-9][0-9]{0,2}|[1-8][0-9]{3}|9000)\b
see demo
this regex matches full word eos
followed literal .
, numbers 1 9000, excluding in negative lookahead.
your eos\.(?!91|90|2300|2504|3747|3750|100|3788|2303|2304|2293)
regex matches eos.
part because look-aheads not consume characters, check presence or absence.
Comments
Post a Comment