Re: Regex for Amateur Radio Callsigns

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

 



> > The only problem with this is that it would take "444" which is not a
> > valid call.

Wikipedia defines a HAM call sign here:
http://en.wikipedia.org/wiki/Call_sign#Amateur_radio

A regex based upon this definition might be: 
/\b(([A-Z]{1,2})|([A-Z][0-9]))[0-9][A-Z]{1,3}\b/

I tested this out a tiny bit and it seems to work OK.  Good luck.

-- 
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