• Robin is right, CLR is the way to go.

    Example:

    Regular Expressions Make Pattern Matching And Data Extraction Easier

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP