Mega Code Archive

 
Categories / Perl / Regular Expression
 

Match any number of alphanumerics followed by a single space character

$p = "This is a pattern test."; if ($p =~ /(\w*\s)/){ print "$1\n"; }