Re: Writing Regular Expressions...

From: Date: Sun, 18 Feb 2001 08:57:59 +0000
Subject: Re: Writing Regular Expressions...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-40408@lists.php.net to get a copy of this message
In article <20010218072701.52496.qmail@web10014.mail.yahoo.com>, dhaval_adams@yahoo.com (Dhaval Desai) wrote: > Can somebody enlighten me with regular expressions... > like [^\-*] something like that. To me it appears as a > code language.. > > Can Anybody tell me what do the various characteers > do? > is there any good article on anywebsites..? besides. > phpwizard .com I have checked that allready... PHP gives you the option of using either: * POSIX regular expressions (ex. ereg_*), which beginners often seem to prefer, or * Perl-compatible regular expressions (PCRE; ex. preg_*), which are very powerful and fast but don't always look as friendly For POSIX regex, you can do "man regex" at the command line, or do a search for "POSIX regular expressions" in any search engine. There are also many, many tutorials on the net (including one at PHPbuilder.com) explaining the "extended regular expressions" syntax, which is basically what that is. For the PCRE functions, the PHP manual includes detailed info about the syntax. Since it also details the minor differences between those functions and the Perl equivalent, any tutorial on Perl regular expressions should be helpful in clarifying anything the manual doesn't make clear enough. For an offline resource, there's the O'Reilly book "Mastering Regular Expressions". -- CC

« previous php.general (#40408) next »