http://qs321.pair.com?node_id=755908


in reply to Re^2: dumb regex question
in thread dumb regex question

if (m{"(/[^"]+)"|(/\S+)}) { my $match = defined $1 ? $1 : $2; ... }
Or whatever's appropriate instead of \S.

Update: Fixed slashes

Replies are listed 'Best First'.
Re^4: dumb regex question
by Nkuvu (Priest) on Apr 07, 2009 at 01:25 UTC

    ...yeah. Or that. Although the regex as given needs a tweak, with embedded slashes in there.

    If it wasn't late in the day on a Monday, I might have come up with a regex that would work. Maybe. But at least the Text::CSV_XS solution is not totally wrong.