Home > Archive > PERL Beginners > July 2007 > Help with Regex (UserName, Email)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Help with Regex (UserName, Email)
|
|
| rolinson@gmail.com 2007-07-26, 3:59 am |
| Hello!
Help with Regex, Thanks in avance!
1=2E Validation of Name
Enable ALL keys on keyboard EXCEPT 0, 1, 2........., 9
Change to uppercase of 1st alphabet of every word and lowercase for
the rest of the word.
Example: aDa AdA 12DDD 12ddd dd12dd =A8=A4 Ada Ada 12Ddd 12Ddd Dd12dd
a) If Name (0-2 characters) < 3 characters, excluding spacing and
punctuations
OR
b) If Any Part of Name has 4 or more consecutive A-Z/0-9 in ascending
or descending order, excluding case sensitivity. (e.g. 6789, 9876,
wxYz, zyXw, Test2345ing, 122abcdZ444)
OR
c) If Name =3D 3 or more consecutive A-Z/0-9 in ascending or descending
order, excluding case sensitivity. (e.g. 678, 987, 6789, 9876, Wxy,
Yxw, wxYz, zyXw)
OR
d) If Name =3D ALL recurring characters, excluding spacing,
punctuations and case sensitivity
(e.g. @@@, AaAaaA, 99999, EE EEE EEEE, eE E;e'E Ee#eE)
OR
e) If Any Part of Name has 3 or more repeat sequence of 2 characters
excluding spacing and case sensitivity. (e.g. sasasa, dfdfdf,
MunununT, MunZUnuNT, a12e12p12, aAbATaBt edab, EaA GAa Raa)
ShowMessage: Please re-enter the Name again.
END
f) If Name at least 1 character =3D 0, 1, 2........., 9 (e.g. A9E, A99E,
A9E9, A9E-A99E, A9E-A99E)
ShowMessage: Only alphabets are allowed. Please re-enter the Name
again.
END
f) If Name at least 1 character =3D Foreign Characters (non-English
characters) (e.g. =B0=D9=B6=C8, a=C1=F5b=B5=C2=BB=AAc, =A5=A4=A5=D9=A5=F3=
=A5=C8, =A5=A4a=A5=D9b=A5=F3c=A5=C8)
ShowMessage: Our system currently only supports English
characters. Only alphabets are allowed. Please re-enter the Name
again.
END
-------------------------------------------------------------------
2=2E Validation of Email Address
a) If Email Address =3D Empty
ShowMessage: Please enter your email address.
END
b) If Email Address Invalid format.
OR
c) If Email Address =3D ALL recurring characters excluding punctuations
and case sensitivity.
(e.g. @@@@@.@@@, aAaAaA@aaAA.AaaAA, 99999@99.99)
ShowMessage: Please re-enter a valid email address again.
END
d) If Email Address at least 1 character =3D Foreign Characters (non-
English characters)
(e.g. =B0=D9=B6=C8@aa=B6=C8ss.com, a=C1=F5=B5=C2=BB=AAc@aass.com, =A5=
=A4=A5=D9=A5=F3=A5=C8@aass.com, =A5=A4a=A5=D9b@a=A5=F3.com)
ShowMessage: Please re-enter a valid email address again.
E) If Your Email and Friend's Email Address is the same (e.g. Your
Email sardttt@hotmail.com and Friend's Email sardttt@hotmail.com)
ShowMessage: Email must not be the same. Please re-enter a valid
email address again.
END
| |
| Jeff Pang 2007-07-26, 3:59 am |
|
--- rolinson@gmail.com wrote:
> Hello!
>
> Help with Regex, Thanks in avance!
>
>
> 1. Validation of Name
>
> Enable ALL keys on keyboard EXCEPT 0, 1, 2.........,
> 9
> Change to uppercase of 1st alphabet of every word
> and lowercase for
> the rest of the word.
> Example: aDa AdA 12DDD 12ddd dd12dd à Ada Ada 12Ddd
> 12Ddd Dd12dd
>
>
> a) If Name (0-2 characters) < 3 characters,
> excluding spacing and
> punctuations
>
> OR
>
> b) If Any Part of Name has 4 or more consecutive
> A-Z/0-9 in ascending
> or descending order, excluding case sensitivity.
> (e.g. 6789, 9876,
> wxYz, zyXw, Test2345ing, 122abcdZ444)
>
> OR
>
> c) If Name = 3 or more consecutive A-Z/0-9 in
> ascending or descending
> order, excluding case sensitivity. (e.g. 678, 987,
> 6789, 9876, Wxy,
> Yxw, wxYz, zyXw)
>
> OR
>
> d) If Name = ALL recurring characters, excluding
> spacing,
> punctuations and case sensitivity
> (e.g. @@@, AaAaaA, 99999, EE EEE EEEE, eE E;e'E
> Ee#eE)
>
> OR
>
> e) If Any Part of Name has 3 or more repeat
> sequence of 2 characters
> excluding spacing and case sensitivity. (e.g.
> sasasa, dfdfdf,
> MunununT, MunZUnuNT, a12e12p12, aAbATaBt edab, EaA
> GAa Raa)
> ShowMessage: Please re-enter the Name again.
>
> END
>
>
>
> f) If Name at least 1 character = 0, 1, 2.........,
> 9 (e.g. A9E, A99E,
> A9E9, A9E-A99E, A9E-A99E)
> ShowMessage: Only alphabets are allowed. Please
> re-enter the Name
> again.
>
> END
>
>
>
> f) If Name at least 1 character = Foreign
> Characters (non-English
> characters) (e.g. 百度, a刘b德华c, イベント,
> イaベbンcト)
> ShowMessage: Our system currently only supports
> English
> characters. Only alphabets are allowed. Please
> re-enter the Name
> again.
> END
>
>
>
-------------------------------------------------------------------
> 2. Validation of Email Address
>
> a) If Email Address = Empty
>
> ShowMessage: Please enter your email address.
>
> END
>
>
>
> b) If Email Address Invalid format.
>
> OR
>
> c) If Email Address = ALL recurring characters
> excluding punctuations
> and case sensitivity.
> (e.g. @@@@@.@@@, aAaAaA@aaAA.AaaAA, 99999@99.99)
>
> ShowMessage: Please re-enter a valid email
> address again.
>
> END
>
>
> d) If Email Address at least 1 character = Foreign
> Characters (non-
> English characters)
> (e.g. 百度@aa度ss.com, a刘德华c@aass.com,
> イベント@aass.com, イaベb@aン.com)
>
> ShowMessage: Please re-enter a valid email
> address again.
>
>
> E) If Your Email and Friend's Email Address is the
> same (e.g. Your
> Email sardttt@hotmail.com and Friend's Email
> sardttt@hotmail.com)
>
> ShowMessage: Email must not be the same. Please
> re-enter a valid
> email address again.
>
> END
>
A long homework question.Hope you good luck to get
someone help you.
--
http://home.earthlink.net/~pangj/
http://home.arcor.de/jeffpang/
________________________________________
________________________________________
____
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
| |
| Prabu Ayyappan 2007-07-27, 3:59 am |
| Hi rolinson,
Read
perldoc perlrequick
perldoc perlre
perldoc perlretut
perldoc perl
perldoc perlfaq6
If you read this and if you tried something with this and still if you are facing some trouble
you Post to the group with the doubts.
Hope this helps you a lot.
Thnx
Prabu
Jeff Pang <jeff.pang@yahoo.com> wrote:
--- rolinson@gmail.com wrote:
> Hello!
>
> Help with Regex, Thanks in avance!
>
>
> 1. Validation of Name
>
> Enable ALL keys on keyboard EXCEPT 0, 1, 2.........,
> 9
> Change to uppercase of 1st alphabet of every word
> and lowercase for
> the rest of the word.
> Example: aDa AdA 12DDD 12ddd dd12dd à Ada Ada 12Ddd
> 12Ddd Dd12dd
>
>
> a) If Name (0-2 characters) < 3 characters,
> excluding spacing and
> punctuations
>
> OR
>
> b) If Any Part of Name has 4 or more consecutive
> A-Z/0-9 in ascending
> or descending order, excluding case sensitivity.
> (e.g. 6789, 9876,
> wxYz, zyXw, Test2345ing, 122abcdZ444)
>
> OR
>
> c) If Name = 3 or more consecutive A-Z/0-9 in
> ascending or descending
> order, excluding case sensitivity. (e.g. 678, 987,
> 6789, 9876, Wxy,
> Yxw, wxYz, zyXw)
>
> OR
>
> d) If Name = ALL recurring characters, excluding
> spacing,
> punctuations and case sensitivity
> (e.g. @@@, AaAaaA, 99999, EE EEE EEEE, eE E;e'E
> Ee#eE)
>
> OR
>
> e) If Any Part of Name has 3 or more repeat
> sequence of 2 characters
> excluding spacing and case sensitivity. (e.g.
> sasasa, dfdfdf,
> MunununT, MunZUnuNT, a12e12p12, aAbATaBt edab, EaA
> GAa Raa)
> ShowMessage: Please re-enter the Name again.
>
> END
>
>
>
> f) If Name at least 1 character = 0, 1, 2.........,
> 9 (e.g. A9E, A99E,
> A9E9, A9E-A99E, A9E-A99E)
> ShowMessage: Only alphabets are allowed. Please
> re-enter the Name
> again.
>
> END
>
>
>
> f) If Name at least 1 character = Foreign
> Characters (non-English
> characters) (e.g. 百度, a刘b德华c, イベント,
> イaベbンcト)
> ShowMessage: Our system currently only supports
> English
> characters. Only alphabets are allowed. Please
> re-enter the Name
> again.
> END
>
>
>
-------------------------------------------------------------------
> 2. Validation of Email Address
>
> a) If Email Address = Empty
>
> ShowMessage: Please enter your email address.
>
> END
>
>
>
> b) If Email Address Invalid format.
>
> OR
>
> c) If Email Address = ALL recurring characters
> excluding punctuations
> and case sensitivity.
> (e.g. @@@@@.@@@, aAaAaA@aaAA.AaaAA, 99999@99.99)
>
> ShowMessage: Please re-enter a valid email
> address again.
>
> END
>
>
> d) If Email Address at least 1 character = Foreign
> Characters (non-
> English characters)
> (e.g. 百度@aa度ss.com, a刘德华c@aass.com,
> イベント@aass.com, イaベb@aン.com)
>
> ShowMessage: Please re-enter a valid email
> address again.
>
>
> E) If Your Email and Friend's Email Address is the
> same (e.g. Your
> Email sardttt@hotmail.com and Friend's Email
> sardttt@hotmail.com)
>
> ShowMessage: Email must not be the same. Please
> re-enter a valid
> email address again.
>
> END
>
A long homework question.Hope you good luck to get
someone help you.
--
http://home.earthlink.net/~pangj/
http://home.arcor.de/jeffpang/
________________________________________
________________________________________
____
Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting
--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/
---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.
|
|
|
|
|