Anyone who could help me with this regexp problem?
I want to verify that a string is made up of 2-3 letters, (a-z + åäö, A-Z + ÅÖÄ), directly followed by 4 or 5 digits, which could, but may not, be followed by a minus and one or two digits.
Examples of valid strings:
abc12345 ABC12345 abc1234 ABC12345-1 ABC12345-01
I would also like to split them into an array consisting of 2 elements;
[0] = the first 2 or 3 letters [1] = the rest
Example:
string = ab12345 [0] = ab [1] = 12345
string = åäö1234-66 [0] = åäö [1] = 1234-66
Lots of thanks in advance,
sincerely
Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php