in reply to Quick Regex Needed
I don't know how fast this is compared to possible regular expressions but this is how I'd start -- given the limited problem description -- and benchmark against other options if this (or a variant of it) isn't fast enough.
my $input = '\one\two\three\four'; my $last = ( split /\\/, $input )[-1]; print $last, "\n";
|
|---|