Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Find part of string

by nimdokk (Vicar)
on Dec 11, 2006 at 15:59 UTC ( #589063=note: print w/ replies, xml ) Need Help??


in reply to Find part of string

Well, one way to do it might be as follows:

while (<DATA>) { chomp; if (/_theWord/) { print "$_ contains '_theWord'\n"; } } __DATA__ ac_dajhta_theWord sd_dfdfe_fdfdv ca_hereeds_theWord se_dcvdfdef_dsfd cx_hserj_theWord fa_dferefvdvv_fadfde

However, I'm sure others might come up with better regex's to use.


Comment on Re: Find part of string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2015-07-06 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (81 votes), past polls