KW.pm | Regular Expressions | #17 |
( $match ) = "abcc" =~ /(c*)/will actually match zero 'c's at the very beginning of the string! use /(c+)/ instead
$input =~ s/^[^\w]*(\w+)[^\w*]$/"$1"/ || $input = "Unknown input";
<< Previous | Index | Next >> | Copyright © 2002 Christopher Calzonetti |