locked
Regex in SQL Server 2008 RRS feed

  • Question

  • I used the CLR capability to create a function that compares a field to the regex.

    I'm stuck on this regex.

    I want to verify that the first Letter of each  word from the beginning of the string until the end is capitalized.

    I am struggling --0

    I Am Struggling -- 0

    I have this so far.

    [\p{Lu}\p{Lt}]

    It  highlights any capital.....  How can I make this regex so that it matches each word


    Chris Aipperspach

    • Moved by Naomi N Monday, March 3, 2014 6:18 PM Suggested as better forum
    Monday, March 3, 2014 5:55 PM

Answers

  • Hello Chris,

    This is really not a Transact-SQL related question and at all no one knows your RegEx-CLR implementation.

    Anyway, use one of those lots of online RegEx test tools like http://regexpal.com/, enter the text + expression to see if it works, for example:

    Also there are a lot of RegEx collections online available, just search for it.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Monday, March 3, 2014 6:10 PM

All replies