# Batch processing to search and replace in all posts

**URL:** <https://meta.discourse.org/t/batch-processing-to-search-and-replace-in-all-posts/33621>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [22 Septiembre, 2015 23:56 UTC](https://meta.discourse.org/t/batch-processing-to-search-and-replace-in-all-posts/33621 "2015-09-22T23:56:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)\
**Post date:** [22 Septiembre, 2015 23:56 UTC](https://meta.discourse.org/t/batch-processing-to-search-and-replace-in-all-posts/33621/1 "2015-09-22T23:56:03Z")

</div>

Is there a simple Ruby script somewhere that can be easily tweaked to do a search and replace in all posts?

I’ve [migrated from MyBB](https://meta.discourse.org/t/migrating-from-mybb/25563/5) and there are some tiny formatting tweaks that need to be made, e.g. replace `[hr]` with `----------`, or [convert the quote lines](https://github.com/discourse/discourse/pull/3802). I’m very new to Ruby (basically learned enough last night to submit that quoteline conversion PR), so I’m looking for a skeleton script that loops through existing posts.

---

_[View the full topic](https://meta.discourse.org/t/batch-processing-to-search-and-replace-in-all-posts/33621)._
