code: def regexp_replace(str, pattern, replacement):
      r
      sc = SparkContext._active_spark_context
      jc = sc._jvm.functions.regexp_replace(_to_java_column(str), pattern, replacement)
      return Column(jc)
docs: r"""Replace all substrings of the specified string value that match regexp with rep.
  
      >>> df = spark.createDataFrame([('100-200',)], ['str'])
      >>> df.select(regexp_replace('str', r'(\d+)', '--').alias('d')).collect()
      [Row(d=u'-----')]