Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

(elbie): Regex not behaving as expected

by elbie (Curate)
on Feb 01, 2003 at 15:44 UTC ( #231848=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $file = 'file013.txt';
    (my $sk = $file) =~ s/^.*?(\d+).*$/$1/;
    
  2. or download this
    my $boring_string = '...when I want to keep most of the string...';
    (my $exciting_string = $boring_string) =~ s/(keep)/<b>$1</b>/;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2023-06-02 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?