This tag uses regular expressions to replace the content inside the tag with whatever characters you specify.
match- The regular expression pattern to use to match what characters to replace. String.
with- The characters to replace what was matched in the
<r:replace match="WordPress" with="CleanSlate"> WordPress is the best CMS. </r:replace> <!-- Output: "CleanSlate is the best CMS." -->
<!-- RegEx matches any digit --> <r:replace match="\d" with="A">123</r:replace> <!-- Output: "AAA" -->
<!-- Regex to grab individual strings, sans commas and spaces --> <!-- Regex from: https://stackoverflow.com/a/5001626 --> <r:replace match="[^,\s][^\,]*[^,\s]*" with="Renamed tag"> tag_1, tag 2, label-3, example </r:replace> <!-- Output: "Renamed tag, Renamed tag, Renamed tag, Renamed tag" -->
Last updated on January 23, 2020.
We welcome all questions, feedback and bug reports. If you're having an issue, we usually need the following information:
- A brief description of the issue
- A link to the page where you saw the issue
- Screenshots that illustrate the problem - How do I take a screenshot?