in reply to Looking for a regex to match last capitalized word in string
Assuming that the last word always consists of one capital letter, and then a series of lower case letters until the end of the string, you could do
my $foo = "siteConfigDelete"; my( $last ) = ( $foo =~ /([A-Z][a-z]+)$/ ); print "$last\n";
|
---|