.. _`Regex example`: .. _`org.sysess.sympathy.examples.regex`: Regex example ````````````` .. image:: example.svg :width: 48 Node demonstrating how to work with regex. Documentation ::::::::::::: This example node demonstrates how to work with regular expressions (regex). For more information about how to write regex, see :ref:`appendix_regex`. Specify a *Pattern* to be matched in the source *Text*. Set the mode to be either *Search* or *Replace*. When in *Search* mode, the first match will be returned if it can be found anywhere in the text. In case of no match, the node will return an empty string. When in 'Replace' mode, all matches will be replaced by the *Replacement* string. There will be no replacement in case of no match, and the node will return the original text. Definition :::::::::: Output ports ............ **output** text Output Text Configuration ............. **Mode** (mode) Search for the first match of the pattern anywhere in the string, or replace at all matches by replacement. **Pattern** (pattern) Regex pattern. **Replacement** (repl) Replacement string. **Text** (src_text) Source text to be matched by pattern. Related nodes ............. * :ref:`org.sysess.sympathy.examples.helloworld` * :ref:`org.sysess.sympathy.examples.helloworldcustomizable` * :ref:`org.sysess.sympathy.examples.outputexample` * :ref:`org.sysess.sympathy.examples.readwrite` * :ref:`org.sysess.sympathy.examples.adjust` * :ref:`org.sysess.sympathy.examples.errorexample` * :ref:`org.sysess.sympathy.examples.progress` * :ref:`org.sysess.sympathy.examples.allparameters` * :ref:`org.sysess.sympathy.examples.controller` Implementation .............. .. automodule:: node_regex_example :noindex: .. class:: RegexExample :noindex: