in reply to Quick Regex Needed

Why wouldn't a regular expression be fast enough? How quick must it be?

With a little light reading and trial-and-error you might come up with something like this:

my $quick = '\one\two\three\four'; my $endpart = ($quick =~ m/([^\\]*)$/ ) ? $1 : ''; print qq|The end part is $endpart\n|;

Replies are listed 'Best First'.
Re^2: Quick Regex Needed
by Your Mother (Archbishop) on Oct 22, 2008 at 02:40 UTC

    Silent updates are kind of bad form. :( Your post was one line last I saw it.

      Yeah, I know, but I couldn't resist putting in a silly remark while working on something helpful (the question just screamed for it). But all is well now :D