#!/perl/bin/perl -w use strict; use warnings; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); print header(); my $test_match = "D:/newdir/cgi-bin/testbin/errors/cgi-bin/testbin/"; #Here it will match just fine #$test_match =~/(.*?)\/([^\/]+)$/; $test_match =~/(.*)\/([^\/]+)\/$/; print "<br>*****$1*****$2****<br>"; #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"; }
In reply to Re^3: Regular Expressions, IF, Issue
by Anonymous Monk
in thread Regular Expressions, IF, Issue
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |