Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: The 'g' modifier in compiled regex

by japhy (Canon)
on Apr 09, 2007 at 03:24 UTC ( #608926=note: print w/replies, xml ) Need Help??

in reply to The 'g' modifier in compiled regex

The /g modifier is an attribute of the pattern matching action, not the regex itself.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re^2: The 'g' modifier in compiled regex
by bart (Canon) on Apr 09, 2007 at 09:23 UTC
    Likewise, the /e modifier is a modifier for the substitution step of s///, which is even one step further away from the regex (qr//) than /g, so that even m//can't use it.

    In Javascript, that borrowed a lot from Perl, the /g is indeed attached to the regex for replace , but IMnsHO, that was a design mistake. It should have been a property, or a separate parameter, of replace.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://608926]
[Corion]: Oof - "Anyway, if it is not obvious, please keep this discussion entirely confidential for now.", as seen on a public mailing list ;)
[Discipulus]: uh no choroba.. i do not practice much with online putyour image sites:can you suggest one (that possibly remove the pic after few days)?
[choroba]: Corion a bug report?
[choroba]: I have no idea :-( I used to post to, but they don't seem to feature "private" pictures in the free version now
[Discipulus]: dazz i'm not an experts but i think it would be possible
[Corion]: dazz: I think Image::Magick can "read" from an in-memory filehandle

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-03-27 07:50 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (317 votes). Check out past polls.