regexp.getString() function

Warning! This page documents an earlier version of Flux, which is no longer actively developed. Flux v0.65 is the most recent stable version of Flux.

The regexp.getString() function returns the source string used to compile a regular expression.

Output data type: String

import "regexp"

regexp.getString(r: /[a-zA-Z]/)

// Returns "[a-zA-Z]"



The regular expression object to convert to a string.

Data type: Regexp


Convert regular expressions into strings in each row
import "regexp"

  |> map(fn: (r) => ({
      r with
      regex: r.regex,
      regexStr: regexp.getString(r: r.regex)