Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Java 8

"
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?;))))?
"
mg

Description

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?;))))?

Submitted by anonymous - 3 years ago