Is there a complete description of the regular expression syntax used in Sql Server Management Studio? There must be a way to do negative lookaheads, for example, but the find/replace dialog doesn't list one.
You can specify precise and complex expressions using regex to find and replace various strings and patterns. In tools, such as SSMS, you can specify the regex patterns in the Find What and Find and Replace options.
Regular expressions are a concise and flexible notation for finding and replacing patterns of text. A specific set of regular expressions can be used in the Find what field of the SQL Server Management Studio Find and Replace dialog box.
We use regular expressions to define specific patterns in T-SQL in a LIKE operator and filter results based on specific conditions. We also call these regular expressions as T-SQL RegEx functions. In this article, we will use the term T-SQL RegEx functions for regular expressions.
SSMS versions 2005-2012 are really just modified/customized Visual Studio Shell (2005-2010) environments, so this Visual Studio (2005-2010) Regular Expression reference applies:
http://msdn.microsoft.com/en-us/library/2k3te2cs(v=vs.80).aspx
Visual Studio 2012 and later have switched to standard .Net regular expressions.
However SSMS did not follow suit and adapt standard regular expressions until SSMS 2016.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With