![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| The Following 3 Users Say Thank You to siLenTz For This Useful Post: | ||
| |
| ||||
| Thanks a lot, all 3 tutorials have helped me build up a little on this function, now all i need to do is put it together which i will be doing in a script im making ![]() |
| The Following User Says Thank You to Lee For This Useful Post: | ||
TeraTask (06-28-2007) | ||
| ||||
| Quote:
don't know what is going to be about) Thanks you...From siLenTz Thanks.... |
| The Following User Says Thank You to siLenTz For This Useful Post: | ||
TeraTask (06-28-2007) | ||
| ||||
| Thank you even though I'm not able to use your tutorial yet, since I'm now overwhelmed with various programming problems ![]() I will surely try out your tutorial once I get done with this problem ![]() P.S each time there's tutorial written, it just make me excited and wanting to try them out all, but I can't do multithreading (for human) lol... we don't have dual core... sigh... multithreading is a headache for me now... |
| ||||
| Ok im using this in my script now that im working on, at the moment my string is: PHP Code: PHP Code: |
| ||||
| Lee, I don't understand your problem with the first regular expression. You want it to start with a letter. admin-# starts with "a" which is a letter. Your second expression only allows a 1 character string (start and end are set and you've give one character in-between). If you're trying to sanitize a username, let me recommend a different approach. I don't know the ereg syntax, so I'll give it to you with perl expressions. PHP Code: |
| ||||
| I think I get what you are trying to do. what you want is only alphabet or number allowed in username. Here is the regular expression for it. PHP Code: regular expression mean only one character allowed in string. But if you put "+", it mean one or more alphabet or number characters allowed. From siLenTz Hope, it is what you want... |
| The Following User Says Thank You to siLenTz For This Useful Post: | ||
Lee (06-29-2007) | ||
| ||||
| Moreover, I prefer this regular expression "^[A-Za-z0-9]{4,30}$" than "^[A-Za-z0-9]+$". "^[A-Za-z0-9]{4,30}$" mean only string, that contain only alphabet or number, is matched, and it must be longer than 3 characters and shorter than 31 characters. From siLenTz Hope that is useful... |
![]() |
| Thread Tools | |
| Display Modes | |
| |