Skip to content

Commit

Permalink
Use double backslash (#5526)
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony Chang <antchang@nvidia.com>
  • Loading branch information
anthony-chang authored May 24, 2022
1 parent a458801 commit 0f35d8c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions integration_tests/src/main/python/string_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,16 +890,16 @@ def test_regexp_whitespace():
gen = mk_str_gen('\u001e[abcd]\t\n{1,3} [0-9]\n {1,3}\x0b\t[abcd]\r\f[0-9]{0,10}')
assert_gpu_and_cpu_are_equal_collect(
lambda spark: unary_op_df(spark, gen).selectExpr(
'rlike(a, "\\s{2}")',
'rlike(a, "\\s{3}")',
'rlike(a, "[abcd]+\\s+[0-9]+")',
'rlike(a, "\\S{3}")',
'rlike(a, "[abcd]+\\s+\\S{2,3}")',
'regexp_extract(a, "([a-d]+)([0-9\\s]+)([a-d]+)", 2)',
'regexp_extract(a, "([a-d]+)(\\S+)([0-9]+)", 2)',
'regexp_extract(a, "([a-d]+)(\\S+)([0-9]+)", 3)',
'regexp_replace(a, "(\\s+)", "@")',
'regexp_replace(a, "(\\S+)", "#")',
'rlike(a, "\\\\s")',
'rlike(a, "\\\\s{3}")',
'rlike(a, "[abcd]+\\\\s+[0-9]+")',
'rlike(a, "\\\\S{3}")',
'rlike(a, "[abcd]+\\\\s+\\\\S{2,3}")',
'regexp_extract(a, "([a-d]+)(\\\\s[0-9]+)([a-d]+)", 2)',
'regexp_extract(a, "([a-d]+)(\\\\S+)([0-9]+)", 2)',
'regexp_extract(a, "([a-d]+)(\\\\S+)([0-9]+)", 3)',
'regexp_replace(a, "(\\\\s+)", "@")',
'regexp_replace(a, "(\\\\S+)", "#")',
),
conf=_regexp_conf)

Expand Down

0 comments on commit 0f35d8c

Please sign in to comment.