![]() |
|
Think about Loose Coupling | |
PerlMonks |
Regexp Creationby artist (Parson) |
on Jan 25, 2008 at 18:45 UTC ( #664335=perlquestion: print w/replies, xml ) | Need Help?? |
artist has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I like to create a regexp for a number that matches given condition and combine such multiple regex.
Numbers are formed in similar way to MasterMind like game.
Example Number: 1122. Conditions:Total 2 digits in correct place and 1 other digit in wrong place. So once we form the regexp and try to match other numbers, then we can deduce that 1232 is ok, but 2211 is not. I also like to get the next regexp for 3456:1:2 ( Number:3456, CorrectPlace:1, Wrong Place:2) etc and combined with previously obtained regexp(s). I am not sure, how to start. Thanks,
--Artist
Back to
Seekers of Perl Wisdom
|
|