Joining regular expressions in julia

Viewed 1303
x = r"abc"
y = r"def"
z = join([x,y], "|")

z # => r"r\"abc\"|r\"def\""

Is there a way to join (and in general manipulate) Regex that deals only with the regex content (i.e. does not treat the r modifier as if it's part of the content). The desired output for z is:

z # => r"abc|def"
1 Answers
Related