Reply to Re: [PHP] Really simple regex

Your name:

Reply:


Posted by Jochem Maas on 06/09/05 13:48

....

>>>>$string="I have xxxxxxxx apples!";
>>>>$string=preg_replace("/x+/sim","x", $string);
>>>>print "$string";

....

>>>>
>>>Thanks, that did it. I did not know about the +. And what is the 'sim'
>>
>>its not one thing but 3 things, everything that comes after a
>>regexp closing marker (but inside the string) is treated as a regexp modifier,
>>in this case the modifiers are:
>>
>>modifer - meaning
>>------------------------------------
>>s - PCRE_DOTALL
>>i - PCRE_CASELESS
>>m - PCRE_MULTILINE
>>
>>read more here: http://nl3.php.net/manual/en/reference.pcre.pattern.modifiers.php
>>
....

>>>
>>
>
> Thank you for that link! I have so much to learn (there is so much to learn).

well the guys that wrote the page deserve the credit!, and I know how you feel
about the learning thing - everytime you think you have a reasonable understanding
of something, another door opens and you realise you don't know 'jack'! :-)

good luck

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация