note 50024 deleted from function.ereg by tularis

From: Date: Thu, 31 May 2007 13:26:06 +0000
Subject: note 50024 deleted from function.ereg by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-127078@lists.php.net to get a copy of this message
Note Submitter: punkpuke at comcast dot net ---- This took me a little to find out, but from one PHP/Regex newb to another if your trying to let people use Square Brackets in a string: [ ] Like in this string for example: ^[a-zA-Z0-9]{1,}$ This following will most likely not work (You can't backslash them): ^[a-zA-Z0-9\[\]]{1,}$ So, to escape the Square Brackets, use the following to delimit collating symbols: [. Special Character Goes Here .] So The New Expression: ^[a-zA-Z0-9 [.[.] [.].] ]{1,}$ (I spaced it so it was less confusing)

« previous php.notes (#127078) next »