locked
regular expressions RRS feed

  • Question

  • I need to conver below patindex settings to Regular Expression.

     

    PATINDEX('[A-Z][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]', @a1) + PATINDEX('[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]', @a1) > 0

    I came up with :

    ([a-z]{1}[0-9]{10})|([0-9]{11}) Does this look correct ?

    Wednesday, November 14, 2012 9:05 PM

Answers

All replies