in reply to Recognizing 3 and 4 digit number
I can't help but think there is more to this requirement than you've specifed, but based on what you've asked for, +a little bit more, try:
/\s\d{3,4}\s/ and print for 'abd 123 fred', '555-5555-6666', 'ab 12345 + xd';; abd 123 fred
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Recognizing 3 and 4 digit number
by htmanning (Friar) on Jan 02, 2017 at 01:20 UTC | |
by 1nickt (Canon) on Jan 02, 2017 at 02:12 UTC | |
by Anonymous Monk on Jan 02, 2017 at 02:05 UTC |