Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

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];
Comment on Re^3: Question on Regex
Select or Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2016-05-30 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?