This expression does not always match. The presence of ^ and $ impose conditions that cause it to not always match. The code below shows a simple case which does not match
$data = "This doesn't match\n"; if ($data =~ /^\s*$/) { print "$data Matches\n"; } else { print "$data Does not match\n"; } #OUTPUT #This doesn't match # Does not match
In reply to Re^2: Explaining a Regular Expression
by zek152
in thread Explaining a Regular Expression
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |