Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://718944]
help
Chatterbox?
[jedikaiti]: Happy Monday
[Tanktalus]: What's so happy about it? :P
[Tanktalus]: ww: your parens don't line up. Sure, perl can look like line noise, but the parens still have to line up. ;)
[Tux]: 1nickt did you build 5.24.3, 5.26.1, and 5.27.4 yet?

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-09-25 16:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (282 votes). Check out past polls.

    Notices?