in reply to Newbie RegEX question
Or if you want to use the POSIX character classes:my( $serial, $name, $category ) = $filename =~ /^(\d+)([A-Z][a-z]*)([A-Z][a-z]*)/;
my( $serial, $name, $category ) = $filename =~ /^(\d+)([[:upper:]][[:lower:]]*)([[:upper:]][[:lower:]]*)/;
jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Newbie RegEX question (posix charclass syntax)
by Aristotle (Chancellor) on May 13, 2003 at 14:57 UTC |