POSIX Vs. PCRE

Replaced the user of ereg w/ preg_match (In PHP 5.3.0)

http://www.php.net/manual/en/reference.pcre.pattern.posix.php

!ereg(“#([0-9a-fA-F]{6,6})”,$val)
IS REPLACED BY
!preg_match(‘/^#([0-9a-fA-F]{6,6})$/’, $val)

+—————–+————————+
| POSIX           | PCRE                   |
+—————–+————————+
| ereg_replace() | preg_replace()   |
| ereg()          | preg_match()     |
| eregi_replace() | preg_replace()   |
| eregi()         | preg_match()     |
| split()         | preg_split()    |
| spliti()        | preg_split()    |
| sql_regcase()   | No equivalent    |
+—————–+————————+

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Advertisements
%d bloggers like this: