Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Re: multiple matches with regexp

by CombatSquirrel (Hermit)
on Oct 10, 2003 at 22:04 UTC ( #298433=note: print w/replies, xml ) Need Help??


in reply to Re: Re: multiple matches with regexp
in thread multiple matches with regexp

A too smart RegEx engine would already break the (?{}) part of the code, which is evaluated every time the engine runs over it. The main problem is that (?{}) is an experimental feature which may be changed or deleted in future Perl versions. Still, AFAIK, it is considered useful for some RegExes (the above one is fairly standard) which will hopefully prevent major changes in the syntax. And don't forget we have Perl 6 coming up ;-).
Cheers,
CombatSquirrel.
Entropy is the tendency of everything going to hell.

Replies are listed 'Best First'.
Re: Re: Re: Re: multiple matches with regexp
by almaric (Acolyte) on Oct 11, 2003 at 17:25 UTC
    To avoid experimental features one may choose the following:
    $regexp="a{2}"; $_="aaaa"; push @a , $1 while m/(?=($regexp))./g; print join ( "-", @a ) . "\n";
    Greetings

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2022-05-27 13:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (95 votes). Check out past polls.

    Notices?