Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Regex Required: Letters, numbers and spaces in a specific format

  •  01-05-2009, 2:13 PM

    Regex Required: Letters, numbers and spaces in a specific format

    Hi all

    I am working on .NET and need a regex to validate any input string to find the input in the format as specified below:

    Letter, numbers and spaces in one of these forms:

    Xn nxx

    Xxn nxx

    Xxnn nxx

    Xnn nXX

     

    where

     X -> Letters A-Z (in capitals)

     x -> Letter a-z (in smalls)

    n -> Number (0-9)

     Thanks all...Actually the above is for validating postcodes in United Kingdom.

    Eg Postcodes: Sn1 5na, Eu2 3hh

    Kunal

    Filed under: , ,
View Complete Thread