diff --git a/dbms/tests/queries/0_stateless/00807_regexp_quote_meta.reference b/dbms/tests/queries/0_stateless/00807_regexp_quote_meta.reference new file mode 100644 index 00000000000..f58c91433e3 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00807_regexp_quote_meta.reference @@ -0,0 +1,12 @@ +hello +hel\\\\lo +h\\{ell}o +\\(h\\{ell}o\\) + +\\( +Hello\\( +\\(Hello +\\(\\(\\(\\(\\(\\(\\(\\(\\( +\\\\ +\\\0\\\\\\|\\(\\)\\^\\$\\.\\[\\?\\*\\+\\{ +1 diff --git a/dbms/tests/queries/0_stateless/00807_regexp_quote_meta.sql b/dbms/tests/queries/0_stateless/00807_regexp_quote_meta.sql new file mode 100644 index 00000000000..afac2d7bece --- /dev/null +++ b/dbms/tests/queries/0_stateless/00807_regexp_quote_meta.sql @@ -0,0 +1,12 @@ +SELECT regexpQuoteMeta('hello'); +SELECT regexpQuoteMeta('hel\\lo'); +SELECT regexpQuoteMeta('h{ell}o'); +SELECT regexpQuoteMeta('(h{ell}o)'); +SELECT regexpQuoteMeta(''); +SELECT regexpQuoteMeta('('); +SELECT regexpQuoteMeta('Hello('); +SELECT regexpQuoteMeta('(Hello'); +SELECT regexpQuoteMeta('((((((((('); +SELECT regexpQuoteMeta('\\'); +SELECT regexpQuoteMeta('\0\\|()^$.[?*+{'); +SELECT DISTINCT regexpQuoteMeta(toString(number)) = toString(number) FROM numbers(100000);