Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 pondering the Monastery: (7)
As of 2014-12-28 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls