Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Global regexp (Regexp::Exhaustive)

by lodin (Hermit)
on Jun 17, 2008 at 18:09 UTC ( #692556=note: print w/replies, xml ) Need Help??


in reply to Re^2: Global regexp
in thread Global regexp

See Regexp::Exhaustive to get every possible match of a pattern against a string. It supports the use of $& et al (without global penalty).

use Regexp::Exhaustive 'exhaustive'; my @matches = exhaustive( 'asdf' => qr/..??/, qw[ $` $& $' ], ); printf "%s<%s>%s\n", @$_ for @matches; __END__ <a>sdf <as>df a<s>df a<sd>f as<d>f as<df> asd<f>

lodin

Replies are listed 'Best First'.
Re^4: Global regexp (Regexp::Exhaustive)
by Anonymous Monk on Jun 18, 2008 at 04:42 UTC
    Nice package. Thanks.
    Investigation of code in Regexp/Exhaustive.pm showed there's constructions like in ikegami's post: <(?!)/tt> and (?{push @array, ...})

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2022-01-19 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (55 votes). Check out past polls.

    Notices?