replaceall regex does not produce result in trino CLI #17474
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
I am working on Trino UDF (version 407). Basically i want to remove '/r/n','/r' and '/n' from the string. The below code does not work if regex with replaceAll is used in Trino. ` import java.util.regex.Matcher; public class RpNewLine
} ` If i test in trino, the result is same as the input as shown below. The same logic works fine and produce result with the replace function. But i don't want to use replace function as i have other regex pattern functionality to solve. |
Beta Was this translation helpful? Give feedback.
-
I have similar problem with control characters, this time changed based on the above solution Before the change, using |
Beta Was this translation helpful? Give feedback.
@natarajank11 How about using the regex
String regex = (\\\\r\\\\n|\\\\n\\\\r|\\\\r|\\\\n)