Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: matching substrings on each line

by grizzley (Chaplain)
on Oct 08, 2012 at 06:31 UTC ( #997748=note: print w/ replies, xml ) Need Help??


in reply to matching substrings on each line

Did I understand correctly, that you want to

  • find string until first space /^(.*?)\s(.*)/; ($left, $right) = ($1, $2);
  • split it by '-' characters @tokens=split /(?<=-)/, $left
  • and find each of the tokens in right side string for $token(@tokens) { @result = $right =~ /$token/g }
?


Comment on Re: matching substrings on each line
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2014-09-01 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (10 votes), past polls