Regular Expressions 101

T-SQL find comments in script

Open Workspace
  • PCRE2 (PHP)
  • Substitution
1

Regular Expression

/
Executed\s+as\s+user:\s+[\w\\]+\.|\[SQLSTATE \d+\] \(\w+ \d+\)\s*\.?
/
gm

Description

Converts the outcome from an SQL Agent Log (one liner) to multi lines, for easy read

Submitted by Paw Jershauge