look for the 4 digits unless it has a dash after it
There's a good reference in the monastery. You want negative look-ahead. I also recommend not using \d. Under Unicode there are MANY numbers that will match that do not conform to the 0..9 I think you expect.
/\b[0-9]{4}\b(?!-)/
In reply to Re: Identifying 3 or 4 digits
by Your Mother
in thread Identifying 3 or 4 digits
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |