--- Bob <[EMAIL PROTECTED]> wrote:

> Hi,
> I'm trying to match 2 or more links.
> 
> <?php
> $raw = "visit http://site.com and http://www.site.com for gifts!";
> 
> if (preg_match("/(http:){2,}/i", $raw)) echo "SPAM";
> else echo "CLEAR";
> ?>
> 
> The above doesn't work.
> Where am I going wrong?
> Thanks, Bob E.

I'm not exactly sure what you want to do here or how you can tell which URLs
are good and which are spam.  However, the regex you have looks for two or more
copies of "http:" in sequence like

http:http:

Obviously, that won't do anything for your input text.

James

Reply via email to