in reply to Re^2: Question on Regex
in thread Question on Regex

Hmm

[ddg://perlfaq nth site:perldoc.perl.org]

perlfaq nth site:perldoc.perl.org

-> perlfaq4#Data: Strings
#Data: Strings
#How do I change the Nth occurrence of something?
#How can I split a [character]-delimited string except when inside [character]?

Close, but no cigar

You can use split

my $fifth = ( split m{/}, $string )[4];

Replies are listed 'Best First'.
Re^4: Question on Regex
by Anonymous Monk on Nov 18, 2012 at 14:43 UTC

    Thanks Monk....