Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $test_match = "D:/newdir/cgi-bin/testbin/errors/"; #Here it will match just fine $test_match =~/(.*?)\/([^\/]+)$/; print "<br>*****$1*****$2****<br>";exit; #But in here the if doesn't, it will go to the ELSE, why? if($test_match =~/(.*?)\/([^\/]+)$/){ print "<br>^^^^$1^^$2^^^^<br>";} else{ print "No Match"; } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expressions, IF, Issue
by Fletch (Bishop) on Apr 21, 2006 at 14:51 UTC | |
| |
|
Re: Regular Expressions, IF, Issue
by japhy (Canon) on Apr 21, 2006 at 15:00 UTC | |
|
Re: Regular Expressions, IF, Issue
by wedgef5 (Scribe) on Apr 21, 2006 at 15:01 UTC | |
by Anonymous Monk on Apr 21, 2006 at 15:06 UTC | |
by Anonymous Monk on Apr 21, 2006 at 15:12 UTC |