Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: positive look behind regexp mystery (\K assertion)

by lodin (Hermit)
on Aug 14, 2008 at 12:54 UTC ( [id://704341]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    s/\.\K[^.]*$/txt/;
    
  2. or download this
    Compiling REx "(?<=[.])[^.]*$"
    Final program:
    ...
       7 <xyz.foo> <>            | 19:  EOL(20)
       7 <xyz.foo> <>            | 20:  END(0)
    Match successful!
    
  3. or download this
    Compiling REx "\.\K[^.]*$"
    Final program:
    ...
       7 <xyz.foo> <>            | 16:    EOL(17)
       7 <xyz.foo> <>            | 17:    END(0)
    Match successful!
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found