I just want it to match "the quick fox" (the spaces could be any gobbledygook at all, I'm parsing HTML and can't use HTML::Parser). What I get is "the dog and the bear are quick, but the quick fox"$text = "the dog and the bear are quick, but the quick fox is quicker" +; $re = "the\\b.*?quick\\b.*?fox"; print "it matches \n" if ($text =~ /($re)/sg); print $1 . "\n";
In reply to Getting the shortest match? by saintbrie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |