I think there maybe a few ways to do this... One is
[EMAIL PROTECTED]@[EMAIL PROTECTED]
That basically says "find me the pattern where one non-at symbol is followed
by an at symbol followed by another non-at symbol"
So if you do
numMatch: 3
Array
(
[0] => Array
(
[0]
Anyone? please?
Thanks!
Shawn
"Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using the following to try and replace urls in my html output:
>
> $newhrefs = preg_replace("/script.php\?(.*)=(.*)&(.*)=(.*)&(.*)=(.*)/",
> "script-$1-$2-$3-$4-$5-$6.html", $hrefs);
On Thu, Dec 12, 2002 at 11:01:47PM -0800, Troy May wrote:
>
> How would take a regular non-formatted text link (http://www.link.com) and
> turn it into ready to post HTML? (href=http://www.link.com>http://www.link.com)
>
> Darn, Outlook formats it, but you get the idea. It would just be typed out
"Richard Lynch" <[EMAIL PROTECTED]> wrote in message...
> > How can I regex to compare the last three chars of a string to "php"?
>
> if (substr($foo, -3) == 'php'){
> }
>
> Oh, wait, you wanted to use RegEx. Sorry, can't help you there. :-)
>
> Don't use a cannon to swat a fly.
probably a good
as a preg "/(...)$/"
this gives you the last three chars..
--
===
Michael J. Ryan - tracker1[*at*]theroughnecks.com
Roughneck BBS: http://www.theroughnecks.net telnet://theroughnecks.net
=
> How can I regex to compare the last three chars of a string to "php"?
if (substr($foo, -3) == 'php'){
}
Oh, wait, you wanted to use RegEx. Sorry, can't help you there. :-)
Don't use a cannon to swat a fly.
--
Like Music? http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://
You're making your expressions too complicated. To test for just that
string,
eregi("HTTP/1\.[01] 302", $output)
should work.
Later,
Sterling
Boaz Yahav wrote:
> I'm trying to find if a string exists inside a string. Instead of using
> strstr() twice I want to use eregi() once.
>
> What I w
You could do it using the strpos() function to find the index of the first
occurance of "" and strrpos() for the last occurence. Then use
substr() to grab what you want...
On Mon, 16 Jul 2001, Julian Simpson wrote:
> I'm trying to parse an existing html file using php.
> I need to use regex to
8 matches
Mail list logo