Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regex Matching

by Kenosis (Priest)
on Dec 05, 2012 at 21:42 UTC ( #1007406=note: print w/ replies, xml ) Need Help??


in reply to Regex Matching

It appears that the 'chalkboard' was just erased...


Comment on Re: Regex Matching
Re^2: Regex Matching
by ww (Bishop) on Dec 05, 2012 at 21:48 UTC

    but the thought lives on (edited to correct some rendering deficiencies)...

    "Hi Monks,
    "I'm in the process of writing a script that generates 8 Random Characters and the user has to make words from these characters. Each character can only be used once. For example, if the random sequence is FOTBIEIW and the user enters FOOT it will show an error message "No match". If the sequence was FOTBOIEW then FOOT would be acceptable.
    "To generate the random letters im using:"

    my @letter=('A'..'Z'); @rand=''; foreach(0..7){ $rand.=$letter[rand(@letter)];
    </code>

    "Then I get the user to enter a word split it into an array.

    "This is where I get stuck."

    for($count=0; $count<= ($wordLength - 1); $count++){ if($wordArray[$count] =~ /[$rand]/o{

    Courtesy of Corion's good works (+ +), we have our own, local 'sorta go a ways back' machine.

      "Once the chalkboard has been erased, it can't be unerased..."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (16)
As of 2014-09-22 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls