[PHP] RE: regex question

2005-05-17 Thread Carl Furst
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 ?php $string = @ one more T@@me for @ and i@ the Bl@@dy [EMAIL

[PHP] Re: regex question?

2003-02-24 Thread Shawn McKenzie
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); This works

[PHP] Re: Regex question

2002-12-12 Thread Paul Chvostek
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? (a href=http://www.link.comhttp://www.link.com/a) Darn, Outlook formats it, but you get the idea. It would just be typed out

[PHP] Re: RegEx question

2002-07-03 Thread Tracker 1
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

[PHP] Re: RegEx question

2002-07-03 Thread Tracker 1
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 call.. :) --

[PHP] Re: RegEx question

2002-07-02 Thread Richard Lynch
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

[PHP] Re: Regex question

2001-07-31 Thread Andrew Sterling Hanenkamp
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 want

[PHP] Re: regex question

2001-07-16 Thread Philip Hallstrom
You could do it using the strpos() function to find the index of the first occurance of i 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