I have this text where I want to identify only certain three digit numbers using my depart city (NYC) as the positive lookbehind expression. I don't want to include it or anything else in the result, other than the desired three digit number.
I can't simply use \d{3,} because there are other three digit numbers in this text I haven't included here which should not be in the output.
Example string:
Depart: NYC (etd 9/30), NJ (etd 10/4)
Arrive LAX
Rate: USD500, 700P
My regular expression
(?<=NYC)(\D|\S)*\d{3,}
Output
(etd 9/30), NJ (etd 10/4) Arrive LAX Rate: USD500, 700
However, I want it to output 700 only.
I've also tried
(?<=NYC)(?<=(\D|\S)*)\d{3,}
but this doesn't output anything.