Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
USE\s(?P<db>\[\w+\]);?\s* CREATE VIEW (?P<schema>\[\w+\])\.(?P<name>\[\w+\]) AS\s* (?P<sql>.+)
/
gis

Description

This regex matches the Transact SQL statement for selecting the database and creating a view.

Submitted by anonymous - a year ago