Jump to content

Function to validate ham radio callsign


techpro

Recommended Posts

I need a PHP function to return true or false depending on whether the supplied argument is in a valid format for a ham radio callsign. I think this should be possible using regular expressions but I can't figure out how to do it.

 

A valid callsign would be a string containing, starting from the left:

 

- zero or one digits, followed by

- one or two alphabetics, then

- one to four digits, then

- one to three alphabetics.

 

Is this possible?

Link to comment
https://forums.phpfreaks.com/topic/147467-function-to-validate-ham-radio-callsign/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.