Re: Regex confusion...



Oops, small correction;

With this code
my $img = "0-12345-abc";
print " Match.1 ", (defined $img);
print " Match.2 ", ($img =~ /\S/);
print " Matched::", $&;
print " pre-Matched::", $`, "\n";
print " post-Matched::", $', "\n";
I get::
Match.1 1 Match.2 1 Matched::0
pre-Matched::
post-Matched::-52557-wind

I expected:
pre="", match="0-12345-abc", post=""


.