Skip to content

Commit 229b01a

Browse files
committed
Add macro for preserving backslashes in strings.
1 parent f5abc46 commit 229b01a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/UDF.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ end
116116

117117
# If ismatch() had a method ismatch(::String, ::String) this could simply be
118118
# @scalarfunc regexp ismatch
119-
# TODO: think of a nice way to escape the regex
120119
@scalarfunc function regexp(r, s)
121120
r = Regex(r)
122121
ismatch(r, s)
123122
end
123+
# macro for preserving the backslashes in a string
124+
macro sr_str(s) s end

0 commit comments

Comments
 (0)