Title |
Test
Find
Pattern Title
|
Expression |
^([A-Z]|[a-z]|[0-9])([A-Z]|[a-z]|[0-9]|([A-Z]|[a-z]|[0-9]|(%|&|'|\+|\-|@|_|\.|\ )[^%&'\+\-@_\.\ ]|\.$|([%&'\+\-@_\.]\ [^\ ]|\ [%&'\+\-@_\.][^%&'\+\-@_\.])))+$ |
Description |
This works good for account names where u don't want your users to create ugly account names. 3 rules apllied in it:
1. an account name must start with Letter or Number
2. the only valid signs are : ^%&'+-@. and (space (chr32))
3. a sign can't be repeated by any sign execept space which can't be repeated as well. |
Matches |
|
Non-Matches |
-=superman=- | $$ Money Man $$ | Lord -- Foo |
Author |
Rating:
Gil Y
|
Source |
|
Your Rating |
|
Title: From Gil Y
Name: Gil Y
Date: 8/20/2004 10:51:34 PM
Comment:
It took a day for me to get to that..(well i discovered regex only 2 days ago) it wasn't easy but it works exactly as intentioned, for some reason negating a repeated char seem to be hard task to program with regex, and that's why I hope you find that expression useful.