Cleaning up a SQL SP with Regex

Posted by Douglas Osborne on Stack Overflow See other posts from Stack Overflow or by Douglas Osborne
Published on 2009-08-06T11:39:37Z Indexed on 2010/06/02 23:04 UTC
Read the original article Hit count: 260

Filed under:
|

1) If I am running a find and replace in SQL 2005 - what would be the regular expression to find tab and space sequences ( or space and tab sequences ) and replace them with just tab?

2) If I have a line which begins with a space - is there a regular expression to convert that leading space to a tab?

3) What would be the regular expression to remove all of the spaces before a CR/LF in a SQL statement?

TIA for the help - I know this will be trivial to most of you, Doug

© Stack Overflow or respective owner

Related posts about sql

Related posts about regex