Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Seeking clarification on possible bug in regex using \G and /gc

by Rhandom (Curate)
on Mar 14, 2018 at 23:24 UTC ( [id://1210924]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -E 'local $_ = "foo"; say "Start" if /\G foo/gcx; say "Mid" if /\
    +G .*/gcx; say "End" if /\G \z/gcx'
    Start
    Mid
    
  2. or download this
    Start
    Mid
    End
    
  3. or download this
    perl -E 'local $_ = "foo"; say "Start" if /\G foo/gcx; say pos; say "M
    +id" if /\G .*/gcx; say pos; say "End" if /\G \z/gcx; say "At End" if 
    +pos == length'
    Start
    ...
    Mid
    3
    At End
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-26 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found