I need to write a regex to capture all numbers being at least 9 digits and not preceded by REQ or INC substrings.
Some examples of what I want:
1234567890 -> match -> 1234567890
INC1234567890 -> not matching
REQ1234567890 -> not matching
IN1234567890 -> match -> 1234567890
What I tried so far:
(?<!(?:REQ|INC))(\d{9,})
But then my results are the following:
1234567890 -> match -> 1234567890
INC1234567890 -> match -> 234567890
REQ1234567890 -> match -> 234567890
IN1234567890 -> match -> 1234567890
I tried playing around with \b but did not achieve anything.