# tensorflow::ops::RegexReplace

`#include <string_ops.h>`

Replaces matches of the `pattern` regular expression in `input` with the replacement string provided in `rewrite`.

## Summary

It follows the re2 syntax (<https://github.com/google/re2/wiki/Syntax>)

Args:

- scope: A [Scope](https://www.tensorflow.org/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- input: The text to be processed.
- pattern: The regular expression to be matched in the `input` strings.
- rewrite: The rewrite string to be substituted for the `pattern` expression where it is matched in the `input` strings.

<br />

Optional attributes (see `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/regex-replace/attrs#structtensorflow_1_1ops_1_1_regex_replace_1_1_attrs`):

- replace_global: If True, the replacement is global (that is, all matches of the `pattern` regular expression in each input string are rewritten), otherwise the `rewrite` substitution is only made for the first `pattern` match.

<br />

Returns:

- `https://www.tensorflow.org/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: The text after applying pattern match and rewrite substitution.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1a476950575052dd378f93320dfb8abeac(const ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input input, ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input pattern, ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input rewrite)` ||
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1a789bb5399331382a4344de266971b9a1(const ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input input, ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input pattern, ::https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input rewrite, const https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/regex-replace/attrs#structtensorflow_1_1ops_1_1_regex_replace_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1a7dda8b284f9da03cdb8789215ce49f6e` | `https://www.tensorflow.org/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1a5aaa612bfbbe1062fb3a7edba850dc08` | `::https://www.tensorflow.org/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1af7c8b0135952cc634c3d1eeae9d7e037() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1a0278c9b0f91ce7ea1ce36d07d960c0f8() const ` |   |
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1aadbcd5dc87a024bfd055536f882464bd() const ` |   |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace_1a5a363e91c2910ff82c7ed8ea2454f7de(bool x)` | `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/regex-replace/attrs#structtensorflow_1_1ops_1_1_regex_replace_1_1_attrs` |

| ### Structs ||
|---|---|
| [tensorflow::ops::RegexReplace::Attrs](https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/regex-replace/attrs) | Optional attribute setters for [RegexReplace](https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace#classtensorflow_1_1ops_1_1_regex_replace). |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### RegexReplace

```
 RegexReplace(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input pattern,
  ::tensorflow::Input rewrite
)
```

### RegexReplace

```
 RegexReplace(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input pattern,
  ::tensorflow::Input rewrite,
  const RegexReplace::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### ReplaceGlobal

```
Attrs ReplaceGlobal(
  bool x
)
```