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.
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 ) {
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
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
* 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.
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
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
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:
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
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)
||
10 matches
Mail list logo