[PHP] PCRE vs. POSIX-extended for regular expressions

2004-01-28 Thread SLanger
Hello

The reaseon why PCRE is faster is because the POSIX standard demands to 
return the longest matching string which means POSIX checks all possible 
matches while PCRE simply returns the first valid match. In cases where 
there is no match both have to check all matches. 
The other thing is, as mentioned before PCRE is a lot more powerfull  than 
POSIX. It contains stuff like look ahead,  look behind which POSIX doesn't 
support. 

Regards
Stefan Langer

Re: [PHP] PCRE vs. POSIX-extended for regular expressions

2004-01-27 Thread Adam i Agnieszka Gasiorowski FNORD
Pablo Gosse wrote:

 Hi all.  Quick quesiton about PCRE vs. POSIX-extended regular
 expressions.
 
 How much of a difference is there between these two types of regular
 expressions.  I know I've read that PCRE is faster, but is it that much
 of a difference?

PCRE are _way_ more advanced, I, personally,
 prefer them. Read about the syntax in the 
 fine manual.

-- 
Seks, seksi, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info  { iWanToDie }   WiNoNa)   (
http://szatanowskie-ladacznice.0-700.pl  foReVeR(  *  )
Poznaj jej zwiewne ksztaty... http://www.opera.com 007

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PCRE vs. POSIX-extended for regular expressions

2004-01-26 Thread Pablo Gosse
Hi all.  Quick quesiton about PCRE vs. POSIX-extended regular
expressions.

How much of a difference is there between these two types of regular
expressions.  I know I've read that PCRE is faster, but is it that much
of a difference?

A while ago I had to write a bunch of regular expression patterns for an
application and I wrote them using the POSIX-extended functions, but now
I'm debating converting them to their PCRE equivalents, because a) it
says they are often faster, and b) I want the experience in both.

Any thoughts on this?

Cheers and TIA,
Pablo 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PCRE vs. POSIX

2001-04-16 Thread John Lim

Rasmus Lerdorf (inventor of PHP) has said that PCRE is generally faster, but
i haven't benchmarked myself. Of course strpos( ) is the fastest.

"bill" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 hi everyone,

 i have been using perl for quite some time, but after getting used to
 php4, i think it rocks.

 i am wondering which is better, performance-wise, when trying to match the
 same text: PCRE or POSIX extended in php4?

 cheers,
 Bill



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PCRE vs. POSIX

2001-04-16 Thread Felix Kronlage

On Mon, Apr 16, 2001 at 07:16:06PM +0800, John Lim wrote:

 Rasmus Lerdorf (inventor of PHP) has said that PCRE is generally faster, but
 i haven't benchmarked myself. Of course strpos( ) is the fastest.

Joerg Krause has posted an URL for a webpage for benchmarking reg-expressions.
Sorry, I don't have the URL anymore, maybe someone (who still has/knows it) could
repost it to the list?

-fkr
-- 
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0  8A48 0D31 9BD3 D9AC 74D0 
  |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE  |
  |all your base are belong to us  |  shame on me  | fkr@IRCnet | 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PCRE vs. POSIX

2001-04-15 Thread bill

hi everyone,

i have been using perl for quite some time, but after getting used to
php4, i think it rocks.

i am wondering which is better, performance-wise, when trying to match the
same text: PCRE or POSIX extended in php4?

cheers,
Bill



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PCRE vs. POSIX

2001-04-15 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (bill) wrote:

 i have been using perl for quite some time, but after getting used to
 php4, i think it rocks.
 
 i am wondering which is better, performance-wise, when trying to match the
 same text: PCRE or POSIX extended in php4?

PCRE.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]