W3cubDocs

/TensorFlow C++

tensorflow::ops::RegexReplace

#include <string_ops.h>

Replaces the match of pattern in input with rewrite.

Summary

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

Arguments:

  • scope: A Scope object
  • input: The text to be processed.
  • pattern: The regular expression to match the input.
  • rewrite: The rewrite to be applied to the matched expresion.

Optional attributes (see Attrs):

  • replace_global: If True, the replacement is global, otherwise the replacement is done only on the first match.

Returns:

  • Output: The text after applying pattern and rewrite.
Constructors and Destructors
RegexReplace(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input pattern, ::tensorflow::Input rewrite)
RegexReplace(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input pattern, ::tensorflow::Input rewrite, const RegexReplace::Attrs & attrs)
Public attributes
output
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Public static functions
ReplaceGlobal(bool x)
Structs
tensorflow::ops::RegexReplace::Attrs

Optional attribute setters for RegexReplace.

Public attributes

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
)

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/regex-replace.html