B
Buck
I am fairly new to regexes. I have the following to parse a SQL
statement, looking for either "FROM" or "JOIN". Is there a way to
shorten the following, so I don't have to repeat the regex after the
word "FROM" or "JOIN"?
from \w*\W+as\W+\w*|join \w*\W+as\W+\w*
e.g., I want it to look like this, but it doesn't work:
[from\join] \w*\W+as\W+\w*
statement, looking for either "FROM" or "JOIN". Is there a way to
shorten the following, so I don't have to repeat the regex after the
word "FROM" or "JOIN"?
from \w*\W+as\W+\w*|join \w*\W+as\W+\w*
e.g., I want it to look like this, but it doesn't work:
[from\join] \w*\W+as\W+\w*