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

Re^2: partial matching of lines in perl

by AnomalousMonk (Archbishop)
on Jun 13, 2020 at 06:54 UTC ( [id://11118012]=note: print w/replies, xml ) Need Help??


in reply to Re: partial matching of lines in perl
in thread partial matching of lines in perl

... the following code ... does not produce your expected output. Perhaps we misunderstand your requirement.

I'm also confused about Sidd@786's expected output. I can see that 'he is man' from file1 should be output because it has 'he is' from file2 as an exact substring. But Sidd@786 also seems to be saying in the OP that 'what goes on' should also be output, and I don't see how that's possible given the (somewhat vaguely presented) data and my (similarly vague) understanding of the requirement. Perhaps Sidd@786 can clarify things for us.

I have code solutions for both index-based and dynamic regex approaches, but I'm a bit reluctant to post because the OP has too strong a smell of homework about it. Perhaps I'll post them tomorrow.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-23 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found