Better regex for serialized data

Regex was wrong and didn't work with empty strings. Also, it's better if you recalculate length after replacing the content (in some cases, sql dump could be already "broken" and length could be already wrong).




Greetings from [Astina](https://github.com/organizations/astina) team ;)