添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Description

The REGEXEXTRACT function extracts the first part of a text value that matches a regular expression.

Usage

REGEXEXTRACT(text, regular_expression)
     

Arguments

Examples

Regular expressions are a versatile tool for matching text. For example, if you might want to extract the area code in order to summarize the number of participants by city.

In the US, phone numbers look like (570) 724-3053, where 570 is the so-called area code. If we have a text field in a form called PHONE_NUMBER, then we could add a calculated field for the area code using the formula:

REGEXEXTRACT(PHONE_NUMBER, "[0-9]{3}")
     

The formula above will match the first group of 3 digits in the PHONE_NUMBER field: