Leonard Burton wrote:
HI,
Tuesday, November 15, 2005, 8:39:19 PM, you wrote:
Here are how they look
W1W
W1AW
WA1W
AD4HZ
N9URK
WB6NOA
4N1UBG
Let's do it this way... What are the rules for a valid callsign?
Basicly, you see an example of each different type of callsign. Other
than the pa
> > 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
> -Original Message-
> From: Leonard Burton [mailto:[EMAIL PROTECTED]
> Sent: 16 November 2005 03:39
> To: php-general@lists.php.net
>
> Basically here is the regex I used (I am not the best with regexes):
>
> $pattern = "/^[0-9]?[A-Z]{1,2}[0-9][A-Z]{1,3}/";
>
> Here are how they look
>
On Wed, Nov 16, 2005 at 12:25:22AM -0500, Leonard Burton wrote:
> HI Curt,
> > > W1W
> > > W1AW
> > > WA1W
> > > AD4HZ
> > > N9URK
> > > WB6NOA
> > > 4N1UBG
> > Ok, so i can conclude so far we have alpha numeric chars minimum of
> > 3 chars up to 6, this would make a regex:
> > /[A-Z0-9]{3,6}/
>
HI Curt,
> > W1W
> > W1AW
> > WA1W
> > AD4HZ
> > N9URK
> > WB6NOA
> > 4N1UBG
> Ok, so i can conclude so far we have alpha numeric chars minimum of
> 3 chars up to 6, this would make a regex:
> /[A-Z0-9]{3,6}/
The only problem with this is that it would take "444" which is not a
valid call.
> > $
On Tue, Nov 15, 2005 at 10:39:19PM -0500, Leonard Burton wrote:
> HI Curt,
>
> Thanks for the reply,
>
> > What does a amateur radio callsign look like? And in what context
> > are you trying to parse this callsign?
>
> Basically here is the regex I used (I am not the best with regexes):
>
> $p
HI Curt,
Thanks for the reply,
> What does a amateur radio callsign look like? And in what context
> are you trying to parse this callsign?
Basically here is the regex I used (I am not the best with regexes):
$pattern = "/^[0-9]?[A-Z]{1,2}[0-9][A-Z]{1,3}/";
Here are how they look
W1W
W1AW
WA1W
On Tue, Nov 15, 2005 at 03:47:21PM -0500, Leonard Burton wrote:
>
> Does anyone know of a regex to work for Amateur Radio Callsigns that
> will work with any from across the world?
What does a amateur radio callsign look like? And in what context
are you trying to parse this callsign?
Curt.
--
8 matches
Mail list logo