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.
More Related Contents:
- Difference between LIKE and ~ in Postgres
- REGEX to select nth value from a list, allowing for nulls
- Best equivalent for IsInteger in SQL Server
- How to Split String by Character into Separate Columns in SQL Server
- oracle — Split multiple comma separated values in oracle table to multiple rows
- Regular Expressions in DB2 SQL
- Regular expression in PostgreSQL LIKE clause
- Oracle 11g – Check constraint with RegEx
- Best way to test SQL queries [closed]
- Perform regex (replace) in an SQL query
- Regular Expression to Match All Comments in a T-SQL Script
- MSSQL Regular expression
- RegEx to Detect SQL Injection
- How to find the common values from two different tables having a common column
- Should I use != or for not equal in T-SQL?
- Any downsides of using data type “text” for storing strings?
- Can I pass column name as input parameter in SQL stored Procedure
- Foreign Key to non-primary key
- Calculating Cumulative Sum in PostgreSQL
- How to create composite primary key in SQL Server 2008
- Rename column SQL Server 2008
- Disable Rails SQL logging in console
- Using pivot on multiple columns of an Oracle row
- How to query a CLOB column in Oracle
- Why does using an Underscore character in a LIKE filter give me all the results?
- Using a database table as a queue
- Is there a severe performance hit for using Foreign Keys in SQL Server?
- PostgreSQL: fill NULL values in timeserie query with previous value
- Date serial in SQL?
- Get most common value for each value of another column in SQL