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

Re^3: Generate list from a to arbitrary letter

by Eily (Hermit)
on Nov 21, 2013 at 00:42 UTC ( #1063646=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Generate list from a to arbitrary letter
in thread [Solved] Generate list from a to arbitrary letter

Well, there would be no point making two test if the result of one was the subset of the other (for exemple "a value that is positive and greater than 10"). In Perl, this condition would actually be: $matches if $_ ne '' and /^[a-zA-Z]*[0-9]*\z/ this was probably to have something easier to understand than one of those two patterns:

/^(?: [a-zA-Z]+ [0-9]* | [a-zA-Z]* [0-9]+ ) \z/x; /^(?=.)[a-zA-Z]*[0-9]*\z/;
The first one being a bit long, and the second not so beginner friendly.


Comment on Re^3: Generate list from a to arbitrary letter
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063646]
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: (10)
As of 2014-08-23 14:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (174 votes), past polls