Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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?
[usemodperl]: what the hell happened to the monastery?

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-06-24 15:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?