@Operator(group="strings") public final class RegexReplace extends PrimitiveOp implements Operand<String>
It follows the re2 syntax (https://github.com/google/re2/wiki/Syntax)
Modifier and Type | Class and Description |
---|---|
static class |
RegexReplace.Options
Optional attributes for
RegexReplace |
operation
Modifier and Type | Method and Description |
---|---|
Output<String> |
asOutput()
Returns the symbolic handle of a tensor.
|
static RegexReplace |
create(Scope scope,
Operand<String> input,
Operand<String> pattern,
Operand<String> rewrite,
RegexReplace.Options... options)
Factory method to create a class wrapping a new RegexReplace operation.
|
Output<String> |
output()
The text after applying pattern match and rewrite substitution.
|
static RegexReplace.Options |
replaceGlobal(Boolean replaceGlobal) |
equals, hashCode, op, toString
public static RegexReplace create(Scope scope, Operand<String> input, Operand<String> pattern, Operand<String> rewrite, RegexReplace.Options... options)
scope
- current scopeinput
- 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.options
- carries optional attributes valuespublic static RegexReplace.Options replaceGlobal(Boolean replaceGlobal)
replaceGlobal
- 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.public Output<String> output()
public Output<String> asOutput()
Operand
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.
asOutput
in interface Operand<String>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.