Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 }
?

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 romping around the Monastery: (12)
As of 2016-06-27 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (341 votes). Check out past polls.