in reply to Re: Regex negative number question
in thread Regex negative number question
But then that rules out '-7.', which the OP explicitly wants to include.
You could try this (leaving out the non-capturing ?:s for clarity):
print "match" if $str =~ /-\d*((?<=\d)\.)|(\.(?=\d))/;but then that would match if:
my $str = 'See answers on pages 234-235.'oh well...
dave
|
|---|