Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^3: Question on Regex

by Anonymous Monk
on Nov 18, 2012 at 14:29 UTC ( #1004419=note: print w/replies, xml ) Need Help??

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


[ddg://perlfaq nth]

perlfaq nth

-> 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....

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004419]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (13)
As of 2016-10-25 08:50 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (315 votes). Check out past polls.