First stripslashes() and all newlines [\n\r*]. It makes the regex much easier.
$pattern= "%%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.
Now, read the doc and see why each term is used. Note, I
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
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 i
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.
global $mac;
if( eregi(
"^[0-9A-Fa-f]{2}\:[0-9A-Fa-f]{2}\:[0-
* 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.
>
> !eregi("^[0-9a-fA-F]{2}\:[0-9a-fA-F]{2}\:[0-9a-fA-F]{2}\:[0-9a-fA-F]{2}\:[0-9a-fA-F]{2}\:[0-9a-fA-F]{2}$",$
I figured out what I was doing wrong. My regexp should of looked like
this /]*>(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 link
This should do (but ofcourse you might want to play a bit with it)
$mem =
'
http://www.mydomain.com/mypage.php";>something is fine
http://www.yourdomain.com/yourpage.php";>something is wrong
http://www.yourdomain.com/yourpage.php";>something is fine
http://www.lgwm.org/";>lgwm
http://www.google.c
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 = ""._ERRORINVEMAIL."";
> ---snip---
>
> This works, but how can I add 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 = ""._ERRORINVEMAIL."";
> ---snip---
>
> This works, but how can I add a second domain?
> ie:
>
Tr
Okay, here's what I have so far:
---snip---
if ((!$email)
|| ($email=="")
|| (!eregi("^[_\.0-9a-z-]+@domain.+[a-z]",$email))
)
$stop = ""._ERRORINVEMAIL."";
---snip---
This works, but how can I add a second domain?
ie:
---snip---
if ((!$email)
|| ($email=="")
10 matches
Mail list logo