Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

regex_capture

Function: regex_capture
  function to capture a piece of text based on a regular expression


Examples:

  regex_capture('hello 42 world', '(\d+)', 0)
  -- Result: "42"

  regex_capture('hello 42 world', '42 (\w+)', 1)
  -- Result: "world"

  regex_capture('hello 42 world', 'nope', 0)
  -- Result: {"type":"match_not_found","english":"No matches found, attempted to retrieve position 0","data":{"position":0,"name":null,"message":"No matches found","hint":null}}




Signatures
text, text, number -> text