You are here: Re: Anything faster than this come to mind? « All PHP « IT news, forums, messages
Re: Anything faster than this come to mind?

Posted by Curtis on 12/17/05 06:58

Curtis <nospam@nohow.not> wrote in message
news:do05co02qv6@news2.newsguy.com...

> if (strstr($parags[$i], "[["))
>
>
> preg_match_all("/
>
>

> ([^\[]{1,200})
> \]\]/x",
> $parags[$i], &$brackets);
> foreach ($brackets[1] as $link)
> {
> $linkarray[] = $link; # $linkarray global.
> $parags[$i] = str_replace($link, "", $parags[$i]);
> }
> }

I see that the regex got mangled in the transmission, and
it's now a blank followed by a line that's short a couple of
backslashes and a [.

This code work, so the real regex is OK for the basics--it
puts the enclosed text in an array and leaves [[]] in its
wake, as it's 'sposed to.

Backslashes are a real pain to work with, it seems.

Curtis

 

Navigation:

[Reply to this 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

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