Regular Expressions 101

Community Patterns

T-SQL find comments in script

1

Regular Expression
PCRE2 (PHP >=7.3)

/
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 - a month ago (Last modified a month ago)