Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^select\s+(?<attr>.+?)\s+from\s+(?<name>\S+)\s*(?:where\s+(?<cnd>[\d\w= ><!]+))?;?$
/
gmi

Description

/^select\s+(?<attr>.+?)\s+from\s+(?<name>\S+)\s*(?:where\s+(?<cnd>[\d\w= ><!]+))?;?$/gmi

Submitted by anonymous - 2 months ago