# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/([\'\"])([^\\]|\\.(?#如果有转义字符,必然是成对出现))*?\1(?#匹配和前面相同的引号)/?/gmu;t' <<< "SELECT 'a', \"b\" from table where a = '这是\"一句\\"断\'了的话' And b <> '特别\"\"的\"\"\"结尾\\\'\\' And c in ('单引号', \"双引号\") and d in ( select 'vv' from table_b ) ORDER BY table.id DESC limit 100,10"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html