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

Re^2: Regexp Creation

by artist (Parson)
on Jan 25, 2008 at 19:12 UTC ( #664340=note: print w/ replies, xml ) Need Help??

in reply to Re: Regexp Creation
in thread Regexp Creation

Yes, exactly. You have put very nicely in words.

I have few more ways in mind. Based on the guess, it can generate set of numbers that matches the conditions. Example: (1122:2:1) can give the set: x112,1x12,12x2,122x. Later on I can combine the sets( cross product) to see, which combination works good ( instead of generating a possibly complex regexp)


Comment on Re^2: Regexp Creation
Download Code
Replies are listed 'Best First'.
Re^3: Regexp Creation
by Not_a_Number (Parson) on Jan 25, 2008 at 20:19 UTC
    (1122:2:1) can give the set: x112,1x12,12x2,122x

    There you have me totally confused. Take the second element from your set, 1x12. The two digits in their correct positions must be the first and last, no? So that means that the 1 in third position must exist in the target string, but at a different position than in the "guess" string.

    Do you see the problem yet?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2015-11-25 10:59 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 (673 votes), past polls