![]() Topic awaiting preservation: bad stuff (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() ok, I know how to do this in perl, but I need to do it in php. I need to check that a string is only numbers, letters, spaces, and underscores. It doesn't have to be all of those, it just can't be something other than those. Any help would be greatly appreciated. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() are the characters used in regular expressions the same in php and perl? |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() also, what does the \x20 part mean? |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() They are in a preg_reg match which use perl regular expression syntax. |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() yes, I did some looking and I think that's what the \x thing does, but then what's the 20 for, Maybe it's part of removing whitespace, because %20 is a space, hmmmm. Hopefully Mr. Max comes back here to tell me |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() You can count on mr.maX comming along here sooner or later. |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() can someone give me a quick email address validification php script as well, it'd be greatly appreciated. |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() If you mean just to check to see if it fits the proper form of an email address you can use this: |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() \x doesn't remove anything, \x20 simply specifies character with hexadecimal value (20 hex = 32 dec = space). |
Obsessive-Compulsive (I) Inmate From: chicago, IL usa |
![]() Hello. I am trying to do the same, but the string must be four charachters. one letter followed by three numbers. the following works, but it allows more than three numbers. any suggestions? |
Paranoid (IV) Inmate From: Dallas, TX |
![]() preg should be: |
Obsessive-Compulsive (I) Inmate From: chicago, IL usa |
![]() thank you genis! |
Paranoid (IV) Inmate From: Dallas, TX |
![]() no prob - and by the way, welcome! |
Paranoid (IV) Inmate From: Seattle, WA, USA |
![]() wow, this topic got dug up again after over a year. |
Paranoid (IV) Inmate From: Dallas, TX |
![]() wow, 13 months exactly... i didn't even notice. |