Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: "Inverse" Pattern Matching

by hdb (Prior)
on Jul 04, 2013 at 20:59 UTC ( #1042524=note: print w/ replies, xml ) Need Help??

in reply to Re: "Inverse" Pattern Matching
in thread "Inverse" Pattern Matching

The length of the pattern can be hundreds. The main source of inefficiency when looping is IMHO that every 'x' constitutes a branch in the pattern. If there is only one 'x' it could stand for one character and one has to pick n-1 other characters to create a pattern of the same length as my short string. However, if 'x' stands for two characters one has to pick only n-2 characters. And if every 'x' stands for two choices, the one has 2**k variants if there are k 'x's.

Comment on Re^2: "Inverse" Pattern Matching
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-11-30 05:08 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (758 votes), past polls