On 5/1/07, Somu <[EMAIL PROTECTED]> wrote:
Hi, i have a matching problem. I get input from the user as a 3-5 character long string consisting of characters from 'l' to 't', and the chars are always sorted for example, the user enters: 'lrqo'. It becomes: 'loqr'. But i have to match the modified string to any of the following: lmn, lpt, lor, mps, npr, nqt, opq, rst. i'm unable to think of the regexp. Actually i'm trying to write a Tic Tac Toe..
Huh? I'm not sure what you're trying to say. Do you want this? /^(lmn|lpt|lor|mps|npr|nqt|opq|rst)$/ Alternatively, can you say more clearly what you would like to match and what you would like not to match? Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
