Re: regular expression help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
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.
function fix_mac( $mac ) {
 global $mac;


It's really weird to both pass in $mac as an argument and to declare it
global...

Do one or the other, but not both.

quite.


Can't help you with the mess of Regex you've got though...

now I bet you can actually, chicken and egg: you have to have the skill to recognise the mess. ;-)


Jason - don't be dishearted:

a, regexp are/can be hard
b, anyone who is giving them a go, is probably trying hard to improve
their skills (we like that :-)) - regexps are quite a hurdle for most people.
c, we all start out writing regexps like yours (i.e. simple ones) and eventually they become more and more complex/arcane until you become Larry Wall.


---
"did someone say 'who is Larry Wall?'?, 10 lashes for that man"



-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux