Regular expression: start a string with period : Pattern matching « Regular Expression « Perl
- Perl
- Regular Expression
- Pattern matching
Regular expression: start a string with period
$line = ".Hello!";
if ($line =~ m/^\./) {
print "You shouldn't start a sentence with a period!";
}
Related examples in the same category