how about explaining your RegEx logic?

  • jeffrey yao

    SSCarpal Tunnel

    Points: 4352

    RegEx is always tough to digest (without referring to document), so it would be good to give an explanation of the logic.

  • Jeff Moden

    SSC Guru

    Points: 995662

    I'm not sure whether or not you meant this to be a separate post or a post on some other thread, but I absolutely agree.

    I'll also state that RegEx, especially RegEx Replace, is frequently a whole lot slower than normal T-SQL if it can, indeed, be done in T-SQL.  Several of us had a bunch of races on a rather larger thread here on SQLServerCentral. com that proved it.  Since this site has gone through two "improvement" upgrades since then, I've lost track of a working URL to get back to it and I'm loath to search for it.


    --Jeff Moden

    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply