# Posts on-save processing with regex/replace configurable in admin panel

**URL:** <https://meta.discourse.org/t/posts-on-save-processing-with-regex-replace-configurable-in-admin-panel/37202>\
**Category:** Feature\
**Created:** [29.Декабрь.2015 00:30:05 UTC](https://meta.discourse.org/t/posts-on-save-processing-with-regex-replace-configurable-in-admin-panel/37202 "2015-12-29T00:30:05Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)\
**Post date:** [29.Декабрь.2015 00:30:05 UTC](https://meta.discourse.org/t/posts-on-save-processing-with-regex-replace-configurable-in-admin-panel/37202/1 "2015-12-29T00:30:05Z")

</div>

If often fix minor issues in posts manually going through all of the posts on my forum on a daily basis. It turns out that most of the issues are typical and I could write a regex/rewrite rule to force the fix as soon as the message is posted or edited.

It would be nice to have such a section in admin panel with a set of rules, 2 inputs each:

1. Regex (optionally introduces regex references)
2. Replace with (optionally uses regex references)

## Examples

- Make empty lines between paragraphs
- Place space after comma if not inside a number (this rule is specific to Russian / Ukrainian locale)
- Remove links to websites from which smile embed codes were copied, i.e. `[url=...][img...][/url]`
- Place large images on their own lines and enforce an empty line before and after

---

_[View the full topic](https://meta.discourse.org/t/posts-on-save-processing-with-regex-replace-configurable-in-admin-panel/37202)._
