Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
select\s+((\*|((\w+(\.\w+)?)+(\s?,\s?\w+(\.\w+)?)*)|((\w+\([^\s]+|(\w+\.\w+)?\))(\s+\,\s+)?)+)\s+from\s+(\w+(\s?,\s?\w+)*\;?)(\s+((\w+\s+join)\s+(\w+(\.\w)?\s+on\s+(\w+(\.\w+)?\s+=\s+\w+(\.\w+)?)?)(\s+,\s+)?)+)?(\s+((limit\s+(\w+)?\s?(\,\w+\;)?)|((where)?\s+?([^\;]+\s?;))))?|((database|user|version)\(\));)
/
gm

Description

select的操作

Submitted by lyf - 3 years ago