Hi all,
I am hopeless with all this regex stuff, and was hoping that someone might be able to fix my regex's,
as i think they are a bit broken.
fullname should = 3-30 in length, contain only uper/lower case a-z, symbols - ' and spaces
username should = 3-16 in length, have a lower case a-z as a first character, and have lower /upper case characters, numbers and symbols - _ .
mothers should be the same as fullname
email should roughly validate e-mail addresses (yes i kow about the modules, but cant install them, and i kow that _some_ valid addresses will get rejected using regex's)
conditions should only = Yes
my %spec = (
fullname => qr/^ [a-zA-Z\s'-] {3,30} \z/x,
username => qr/^ [a-z] [-.\w]{2,15} \z/x,
mothers => qr/^ [a-zA-Z\s'-] {3,30} \z/x,
email => qr/^ [\w\.-]+ \@ (?:[a-z\d-]+\.)+ [a-z\d]+ \z/ix,
conditions => qr/^Yes\z/,
);
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.