Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Regx help

by Punitha (Priest)
on Oct 23, 2008 at 04:22 UTC ( #718944=note: print w/ replies, xml ) Need Help??


in reply to Regular expression help

Hi

Please take a note about the regular expressions here http://perldoc.perl.org/perlretut.html and do you want something like this?

use strict; my $string = "Required Not_Required Not_Required Required"; while($string=~/\bRequired\b/gi){ print "$&\n";##Here it will print only required text with non word + character before and after }

Punitha


Comment on Re: Regx help
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (21)
As of 2015-07-02 18:03 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 (44 votes), past polls