You could collapse the above code into a one-liner: print+(/[A-Z][^\WA-Z]*/g)[-1],$/for"siteConfigView","siteConfigDelete (with ws and lc extras) " --Davefor ("siteConfigView", "siteConfigDelete (with ws and lc extras) ") { my $last = (/([A-Z][^\WA-Z]*)/g)[-1]; print "$last\n"; }
In reply to (FWP) Re: Re: regexps
by redsquirrel
in thread Looking for a regex to match last capitalized word in string
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |