On Tue, 2003-10-14 at 14:14, David Sklar wrote: > On Tuesday, October 14, 2003 1:10 PM, mailto:[EMAIL PROTECTED] wrote: > > > You are pushing towards > > > > $_~=/^\.*?\$$/; > > > > This is not human-readable code and one of the basic characteristics > > that sets PHP apart from Perl. > > Actually, I'm pushing towards > > if (! ($_REQUEST['email'] =~ '/[EMAIL PROTECTED]@([-a-z0-9]+\.)+[a-z]{2,}$/i')) { > $form->addError('Please enter a valid e-mail address.'); > } > > There's not much we can practically do about the punctuation density of > regular expressions, but we can make their use more widespread by changing > the syntax of how they're invoked.
Why would this make regular expressions more widespread? I would expect that regular expressions are used wherever necessary and otherwise not used, regardless of syntax. Or are you saying because regex matching is invoked via a function that you don't use regex? In such a case I'd have to ask what you use instead!? Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php