Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Answer: How do I match for a pattern in an array element delimited with a /

( #206431=categorized answer: print w/ replies, xml ) Need Help??

Q&A > regular expressions > How do I match for a pattern in an array element delimited with a / contributed by nothingmuch

foreach (@array){ # iterate the array while(m#/MSS#g){ # find a /MSS substr($_,pos,do { m#/#g; pos }) =~ s/ (?!\*)//g; # find a closing / # substring the range currently in effect /MSS to / # replace all ' ' (replace with \s if applicable) # not followed by a * with nothing } }

Comment on Answer: How do I match for a pattern in an array element delimited with a /
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-08-30 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (292 votes), past polls