Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Re: New regex trick...

by japhy (Canon)
on Jul 22, 2002 at 20:49 UTC ( #184233=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $str = "Match 9 the 1 last 6 digit 2 blah";
    $str =~ /.*\d/;    print "[$`] [$&] [$']\n";
    $str =~ /.*\K\d/;  print "[$`] [$&] [$']\n";
    __END__
    [] [Match 9 the 1 last 6 digit 2] [ blah]
    [Match 9 the 1 last 6 digit ] [2] [ blah]
    
  2. or download this
    # you go from this:
    s/(saveme)deleteme/$1/;
    
    # to this:
    s/saveme\Kdeleteme//;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2021-04-13 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?