---
title: regexp.getString() function
description: regexp.getString() returns the source string used to compile a regular expression.
url: https://docs.influxdata.com/flux/v0/stdlib/regexp/getstring/
estimated_tokens: 128
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/regexp/getstring/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.33.0+

InfluxDB support

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

##### Function type signature

```js
(r: regexp) => string
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### r

(Required)
Regular expression object to convert to a string.

#### Related

* [regexp.compile() function](/flux/v0/stdlib/regexp/compile/)
* [Work with regular expression types](/flux/v0/data-types/basic/regexp/)
