# Imported MyBB database MyCode issue

**URL:** <https://meta.discourse.org/t/imported-mybb-database-mycode-issue/144173>\
**Category:** Migration\
**Tags:** mybb\
**Created:** [March 13, 2020, 6:39am UTC](https://meta.discourse.org/t/imported-mybb-database-mycode-issue/144173 "2020-03-13T06:39:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [March 13, 2020, 10:13pm UTC](https://meta.discourse.org/t/imported-mybb-database-mycode-issue/144173/3 "2020-03-13T22:13:27Z")

</div>

I had the same issue when importing a very old (2002) PhpBB forum and I added various regexes to the importer to remove (or maybe replace in some case) these BBCode tags. It worked quite well in the end.

> [@pfaffman](#):
>
> With the quotes you need to be sure that there are new lines before the opening and after the closing tags.

I also had the `[quotes]` issue when I had to “move” them on their own line in order to be correctly displayed with markdown.

I found this in some personal logs, I believe it’s what I achieved for this particular issue:

```ruby
text.gsub!(/(\[\/?quote.*?\])/mi) { |q| "\n#{q}\n" }

```

From what I wrote at this time, it worked for all quotes on 150000 messages except… 57 quotes for unknown reasons and such a small number of failed quotes didn’t really matter. I could even fix them manually.

---

_[View the full topic](https://meta.discourse.org/t/imported-mybb-database-mycode-issue/144173)._
