[PHP] Re: regular expression help!

2007-01-18 Thread Al
First stripslashes() and all newlines [\n\r*]. It makes the regex much easier. $pattern= %img\x20[\w\d\=\x20]+(src=\x20*\)([/\w\d\.]+)[\\x20]*/%i; preg_match($pattern, $string, $match); If more than one in the string, use preg_match_all(). Now print_r($match); so you can see the result.

[PHP] Re: regular expression help

2005-01-21 Thread Jason
Jason wrote: Simple functions to check fix if necessary invalid formating of a MAC address... I seem to be having problems with the global variable $mac not being returned from the fix_mac() function. Any help is appreciated. ?php /* * ex. 00:AA:11:BB:22:CC */ function chk_mac( $mac ) {

Re: [PHP] Re: regular expression help

2005-01-21 Thread RaTT
Hi, From what i can see you dont even need to call global, as your passing variables to the function ? this could be causing the script to confuse itself. hth On Fri, 21 Jan 2005 09:30:21 -0700, Jason [EMAIL PROTECTED] wrote: Jason wrote: Simple functions to check fix if necessary invalid

[PHP] Re: regular expression help

2005-01-21 Thread Jason
You were right, I removed the reference to global $mac and it started working great. Thanks. It seems sometimes another set of eyes to catch stuff really helps... thanks. Jason wrote: Jason wrote: Simple functions to check fix if necessary invalid formating of a MAC address... I seem to be

[PHP] Re: Regular expression help?

2004-02-02 Thread Matthew Weier O'Phinney
* Jas [EMAIL PROTECTED]: Not sure if anyone knows of a good way to match strings of this type... 00:02:8b:0c:2f:09 I have tried this but its not working.

[PHP] Re: Regular Expression Help in my PHP! Sorry if wrong group

2003-01-15 Thread Jason Lehman
I figured out what I was doing wrong. My regexp should of looked like this /a[^]*(Tampa)\/a/ and that made it more specific and kept it to that match. Jason Lehman wrote: I have a script that turns certain words into links. That I am having no problems with, it is when I want to turn the

[PHP] Re: regular expression help

2001-09-18 Thread _lallous
This should do (but ofcourse you might want to play a bit with it) $mem = ' A HREF=http://www.mydomain.com/mypage.php;something/a is fine A HREF=http://www.yourdomain.com/yourpage.php;something/a is wrong A HREF=http://www.yourdomain.com/yourpage.php;something/a is finebr a

Re: [PHP] Re: Regular Expression help

2001-06-30 Thread J Smith
Clayton Dukes wrote: Okay, here's what I have so far: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This works, but how can I add a second domain? ie: Try:

Re: [PHP] Re: Regular Expression help

2001-06-30 Thread Brad Hubbard
On Fri, 29 Jun 2001 23:43, Clayton Dukes wrote: Okay, here's what I have so far: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This works, but how can I add a

[PHP] Re: Regular Expression help

2001-06-29 Thread Clayton Dukes
Okay, here's what I have so far: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This works, but how can I add a second domain? ie: ---snip--- if ((!$email) ||