:py:mod:`core.render.html.env.regex`
====================================
.. py:module:: core.render.html.env.regex
Module Contents
---------------
Functions
~~~~~~~~~
.. autoapisummary::
core.render.html.env.regex.regexMatch
core.render.html.env.regex.regexReplace
core.render.html.env.regex.regexSearch
.. py:function:: regexMatch(render, pattern, string, flags = 0)
Jinja2 global: Match a string for regular expression pattern.
This function internally runs re.match().
:param render: The html-renderer instance.
:param pattern: Regular expression pattern to be matched.
:param string: String where to be searched in.
:param flags: Flags to be passed to re.search().
:return: A matching object on success, else None.
.. py:function:: regexReplace(render, string, pattern, replace)
Jinja2 global: Replace string by regular expression pattern.
:param render: The html-renderer instance.
:param string: String to be replaced.
:param pattern: Regular expression pattern to be matched.
:param replace: Replacement string to be inserted for every matching pattern.
:return: The string with the replaced matches.
.. py:function:: regexSearch(render, string, pattern, flags=0)
Jinja2 global: Search a string for regular expression pattern.
This function internally runs re.search().
:param render: The html-renderer instance.
:param string: String where to be searched in.
:param pattern: Regular expression pattern to be matched.
:param flags: Flags to be passed to re.search().
:return: A matching object on success, else None.