Re: Stripping Characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shreyas Agasthya wrote:
> Then, when does one use ereg_replace as against preg_replace? I read from
> one the forums that preg_* is faster and ereg_* is if not faster but
> simpler.

BUT, all the ereg_* has been depricated.  DO NOT USE THEM if you want your code
to work in the future.  :)

> 
> Is that it?
> 
> Regards,
> Shreyas
> 
> 
> 
> On Tue, Jun 22, 2010 at 9:58 PM, Richard Quadling <rquadling@xxxxxxxxx>wrote:
> 
>> "A "word" character is any letter or digit or the underscore
>> character, that is, any character which can be part of a Perl "word".
>> The definition of letters and digits is controlled by PCRE's character
>> tables, and may vary if locale-specific matching is taking place. For
>> example, in the "fr" (French) locale, some character codes greater
>> than 128 are used for accented letters, and these are matched by \w."
>>
>> The above becomes ...
>>
>> _A _word_ character is any letter or digit or the underscore
>> character_ that is_ any character which can be part of a Perl _word__
>> The definition of letters and digits is controlled by PCRE_s character
>> tables_ and may vary if locale_specific matching is taking place_ For
>> example_ in the _fr_ _French_ locale_ some character codes greater
>> than 128 are used for accented letters_ and these are matched by _w__
>>
>> --
>> -----
>> Richard Quadling
>> "Standing on the shoulders of some very clever giants!"
>> EE : http://www.experts-exchange.com/M_248814.html
>> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
>> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
>> ZOPA : http://uk.zopa.com/member/RQuadling
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> 


-- 
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux