---
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: 317
product: Flux
version: v0
---

# regexp.getString() function

-   Flux 0.33.0+
-   View 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/)
