Title |
Test
Find
MySQL Query Comments and Strings
|
Expression |
("(?:(?:(?:\\.)|[^"\\\r\n])*)"|'(?:(?:(?:\\.)|[^'\\\r\n])*)'|`(?:(?:(?:\\.)|[^`\\\r\n])*)`)|((?:-- .*)|(?:#.*)|(?:/\*(?:(?:[^*]|\*(?!/))*)\*/)) |
Description |
Isolates MySQL Query strings and comments. Lines that look like comments inside strings are not falsely recognised as comments. To strip comments from a MySQL Query, simply replace all matches with group 1 |
Matches |
-- insurance, # renaming some primary keys, /**/, "hello -- this is not a comment" |
Non-Matches |
ALTER TABLE table_insurance_covered |
Author |
Rating:
Not yet rated.
Patrick Zahra
|
Source |
|
Your Rating |
|