Regular expression to match common SQL syntax?

Regular expressions can match languages only a finite state automaton can parse, which is very limited, whereas SQL is a syntax. It can be demonstrated you can’t validate SQL with a regex. So, you can stop trying.

Leave a Comment