<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>regex_replace - Hermes</title>
    <link>https://hermes.insa-strasbourg.fr/en/setup/configuration/plugins/attributes/regex_replace/</link>
    <description>Description This plugin allows performing a replacement in a string using the specified regular expression.&#xA;Configuration Nothing to configure for the plugin.&#xA;hermes: plugins: attributes: regex_replace: Usage regex_replace(value: str, pattern: str, replacement: str, ignorecase: bool = False, multiline: bool = False, count: int = 0, mandatory_count: int = 0) → str As this plugin is just an adaptation of Ansible’s regex_replace_filter, you can also check its documentation.&#xA;# Will be &#39;able&#39; regex_result: &#34;{{ &#39;ansible&#39; | regex_replace(&#39;^a.*i(.*)$&#39;, &#39;a\\1&#39;) }}&#34; # Will be &#39;#CAR\n#tar\nfoo\n#bar\n&#39; regex_result: &#34;{{ &#39;CAR\ntar\nfoo\nbar\n&#39; | regex_replace(&#39;^(.ar)$&#39;, &#39;#\\1&#39;, multiline=True, ignorecase=True) }}&#34; # It is possible to apply the method to a list of strings. Let&#39;s take LDAP_PASSWORD_HASHES, which contains a list of LDAP password hashes: # LDAP_PASSWORD_HASHES: # - &#34;{SMD5}NGnIxNg+ZqB3XwhQK/jCRDWWpUQYVbwg&#34; # - &#34;{SSHA}9u8ZbEbeLPLI2f4isG7YjJsz6sfonjQAfbbadQ==&#34; # - &#34;{SSHA256}l0rZ10MhH6jKGogg2qFvCdiNAqkKVH9OuL0R3FgWRrV4mIaYM2cnYQ==&#34; # - &#34;{SSHA512}zKR46tmGg0NKq1FdkmLGZCqXqfnApvFRHSTW4H0Sem9zJH66mgZ6/aB/aypGX+dLAI02akd9lZbplX6y0Typzzir8RIKh6cw,&#34; # Remove the prefix inside the braces indicating the hash type. # regex_results: # - &#34;NGnIxNg+ZqB3XwhQK/jCRDWWpUQYVbwg&#34; # - &#34;9u8ZbEbeLPLI2f4isG7YjJsz6sfonjQAfbbadQ==&#34; # - &#34;l0rZ10MhH6jKGogg2qFvCdiNAqkKVH9OuL0R3FgWRrV4mIaYM2cnYQ==&#34; # - &#34;zKR46tmGg0NKq1FdkmLGZCqXqfnApvFRHSTW4H0Sem9zJH66mgZ6/aB/aypGX+dLAI02akd9lZbplX6y0Typzzir8RIKh6cw,&#34; regex_results: &#34;{{ LDAP_PASSWORD_HASHES | map(&#39;regex_replace&#39;, &#39;^{[^}]+}(.*)$&#39;, &#39;\\1&#39;) | list }}&#34;</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <lastBuildDate></lastBuildDate>
    <atom:link href="https://hermes.insa-strasbourg.fr/en/setup/configuration/plugins/attributes/regex_replace/index.xml" rel="self" type="application/rss+xml" />
  </channel>
</rss>