in reply to Re: negative look-ahead is ignored
in thread negative look-ahead is ignored
You might want to consider a negative lookahead on \d as well:
\d{4}-\d{1,3}(?![-\d])
Of course, this means you won't match a string like "2005-1222" either. The original would match that, and if that's intentional, you need an even trickier version:
\d{4}-\d{1,3}(?!\d*-)
Here's betting one of these should be what you want. :-)
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
|
|---|