twalthr commented on a change in pull request #6659: [FLINK-10281] [table] Table function parse regular expression contains backslash failed URL: https://github.com/apache/flink/pull/6659#discussion_r215673314
########## File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/ExpressionParser.scala ########## @@ -186,7 +186,7 @@ object ExpressionParser extends JavaTokenParsers with PackratParsers { } lazy val singleQuoteStringLiteral: Parser[Expression] = - ("'" + """([^'\p{Cntrl}\\]|\\[\\'"bfnrt]|\\u[a-fA-F0-9]{4})*""" + "'").r ^^ { + ("'" + """([^'\p{Cntrl}]|\\[\\'"bfnrt]|\\u[a-fA-F0-9]{4})*""" + "'").r ^^ { Review comment: I'm not 100% sure if this is the correct fix. The regular expression has been adapted from Scala's `JavaTokenParsers`. Maybe we just need to update it as done [here](https://github.com/scala/scala-parser-combinators/blob/1.1.x/shared/src/main/scala/scala/util/parsing/combinator/JavaTokenParsers.scala)? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services