Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18477#discussion_r146653358
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
 ---
    @@ -375,7 +378,10 @@ case class RegExpReplace(subject: Expression, regexp: 
Expression, rep: Expressio
       usage = "_FUNC_(str, regexp[, idx]) - Extracts a group that matches 
`regexp`.",
       extended = """
         Examples:
    -      > SELECT _FUNC_('100-200', '(\d+)-(\d+)', 1);
    +      spark-sql> SELECT _FUNC_('100-200', '(\\d+)-(\\d+)', 1);
    +       100
    +
    +      scala> SELECT _FUNC_('100-200', '(\\\\d+)-(\\\\d+)', 1);
            100
    --- End diff --
    
    > Array([100])


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to