# regexp.getString() function

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]"
``````

## Parameters

### r

The regular expression object to convert to a string.

## Examples

###### Convert regular expressions into strings in each row
``````data
|> map(fn: (r) => ({r with regex: r.regex, regexStr: regexp.getString(r: r.regex)}))
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.56101686,"math_prob":0.4912542,"size":744,"snap":"2022-05-2022-21","text_gpt3_token_len":164,"char_repetition_ratio":0.13108107,"word_repetition_ratio":0.0,"special_character_ratio":0.21908602,"punctuation_ratio":0.1594203,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9831434,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-17T17:48:02Z\",\"WARC-Record-ID\":\"<urn:uuid:932a49f7-1a79-48ca-af18-ee54791bf8aa>\",\"Content-Length\":\"75307\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b57540cf-a6b0-496a-b717-0371ff8517f6>\",\"WARC-Concurrent-To\":\"<urn:uuid:ca1cd21a-378e-4c45-842e-b57ec39dc9f3>\",\"WARC-IP-Address\":\"13.32.153.31\",\"WARC-Target-URI\":\"https://docs.influxdata.com/flux/v0.x/stdlib/regexp/getstring/\",\"WARC-Payload-Digest\":\"sha1:5LYHS32NUGAQNGB3WPCCWXHL2ASQEVLH\",\"WARC-Block-Digest\":\"sha1:75KLQINR6GYGBWUUH73NXRWRIXV4EVAO\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662519037.11_warc_CC-MAIN-20220517162558-20220517192558-00775.warc.gz\"}"}