StaticRegexReplace

public final class StaticRegexReplace

Replaces the match of pattern in input with rewrite.

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

Nested Classes

class StaticRegexReplace.Options Optional attributes for StaticRegexReplace  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output<TString>
asOutput()
Returns the symbolic handle of the tensor.
static StaticRegexReplace
create(Scope scope, Operand<TString> input, String pattern, String rewrite, Options... options)
Factory method to create a class wrapping a new StaticRegexReplace operation.
Output<TString>
output()
The text after applying pattern and rewrite.
static StaticRegexReplace.Options
replaceGlobal(Boolean replaceGlobal)

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "StaticRegexReplace"

Public Methods

public Output<TString> asOutput ()

Returns the symbolic handle of the tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static StaticRegexReplace create (Scope scope, Operand<TString> input, String pattern, String rewrite, Options... options)

Factory method to create a class wrapping a new StaticRegexReplace operation.

Parameters
scope current scope
input The text to be processed.
pattern The regular expression to match the input.
rewrite The rewrite to be applied to the matched expression.
options carries optional attributes values
Returns
  • a new instance of StaticRegexReplace

public Output<TString> output ()

The text after applying pattern and rewrite.

public static StaticRegexReplace.Options replaceGlobal (Boolean replaceGlobal)

Parameters
replaceGlobal If True, the replacement is global, otherwise the replacement is done only on the first match.