【问题标题】:Regex in Scala giving unexpected additional resultsScala 中的正则表达式给出了意想不到的额外结果
【发布时间】:2022-07-05 17:04:12
【问题描述】:

我想识别以字符 id 开头的列

我们尝试了 ^id* 和 ^(id)*,它们在 Regexr 中有效,但在 Scala 中无效

正则表达式:

RegExr screenshot

Scala (Databricks)

Databricks Screenshot

【问题讨论】:

    标签: scala databricks


    【解决方案1】:

    答案是 ^(id) 没有尾随 *

    screenshot of working notebook

    【讨论】:

      猜你喜欢
      • 2016-12-17
      • 1970-01-01
      • 1970-01-01
      • 2019-05-19
      • 2017-01-05
      • 2021-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多