|
|
| P is for Practical | |
| PerlMonks |
Re: ?Homework alert! Re: validating string length with a regular expressionby buckaduck (Chaplain) |
| on Mar 18, 2002 at 13:16 UTC ( [id://152544]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
<wild speculation> Although it's not my question, I can imagine a situation where someone is validating a set of variables which contain user-supplied data. A simple design for validating them might involve a hash table which correlates each data type to an "allowable" regex pattern. Not that there aren't ways around this (perhaps using subroutines instead of regexes). But I'll admit that I've done it before, cramming a lot of data validation into a single regex for this purpose. </wild speculation> Update: I'm good. But I'm slow. Ah, well... buckaduck
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||