| PHP | |
1 | ereg("^[A-Za-z0-9'\r\n\/,\.#()!?�$*+= -]+$",$value) |
As far as I can see that's checking to see if any (1 or more) of the specified characters exist in $value. The characters being checked for being
any upper or lower case letter
any digit
' [apostrophe]
/ [forward slash]
, [comma]
. [period or full stop]
# [hash]
( [open round bracket]
) [close round bracket]
! [exclamation mark or shriek]
? [question mark]
£ [pound sign]
$ [dollar sign]
* [asterisk]
+ [plus sign]
= [equals sign]
[space]
- [minus sign or hyphen]
I have no idea what the � is there for, perhaps it's some sort of typo. (It's immediately before the apostrophe but has been removed by the forum code.)
Also I cannot understand the use of escape r and escape n.
Have I understood the pattern correctly?
Any thoughts on the � and the escape r and n ?
Tony
Edited by cheshire_man (Thu 09-Sep-10 16:03:19)



Pages in this thread:
Print Thread
cheshire_man