Title: Incorrect Regex in clearUnusedArrayDatafields
Last modified: August 30, 2016

---

# Incorrect Regex in clearUnusedArrayDatafields

 *  Resolved [aakins](https://wordpress.org/support/users/aakins/)
 * (@aakins)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/incorrect-regex-in-clearunusedarraydatafields/)
 * `$datastructure = preg_replace("/{".$regExpPatt.":ifNotEmptyAddLeftRight:".$this-
   >regExpPatternDetect."}/i", "", $datastructure);`
 * Should be:
    `$datastructure = preg_replace("/{".$regExpPatt.":ifNotEmptyAddLeftRight:".
   $this->regExpPatternDetectWithBrackets."##".$this->regExpPatternDetect."##}/i","",
   $datastructure);`
 * Also, I believe that the **html,** matches are missing from the **clearUnusedArraryDatafields**.
 * The documentation shows that `{street:ifNotEmptyAddLeftRight:extratextleft##extratextright}`
   is the proper syntax, but is missing the last two pound signs before the ending
   bracket. ie. `{street:ifNotEmptyAddLeftRight:extratextleft##extratextright##}`
 * [https://wordpress.org/plugins/json-content-importer/](https://wordpress.org/plugins/json-content-importer/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/incorrect-regex-in-clearunusedarraydatafields/#post-6735074)
 * Hi aakins,
 * you checked the PRO-Version, as “ifNotEmptyAddLeftRight” is in PRO only. Here
   we talk about the free-version. Hence please mail me via [http://json-content-importer.com/legal-contact/](http://json-content-importer.com/legal-contact/)
   and we can discuss in detail.
 * But:
    1. The next version of the free version clearUnusedArrayDatafields will
   have a enhancement with the “html,” fields. So the PRO-Version.
 * 2.The Dokumenation is false. The “##}” at the end is required.
 * 3. The Codelines above: You’re right. Fix in next PRO-Version.
 * Thanks a lot!
    Bernhard
 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/incorrect-regex-in-clearunusedarraydatafields/#post-6735201)
 * PRO-verson 2.0.14 is out, does this help you?
 *  Thread Starter [aakins](https://wordpress.org/support/users/aakins/)
 * (@aakins)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/incorrect-regex-in-clearunusedarraydatafields/#post-6735204)
 * Yes. Thanks Bernhard!
 *  Plugin Author [berkux](https://wordpress.org/support/users/berkux/)
 * (@berkux)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/incorrect-regex-in-clearunusedarraydatafields/#post-6735225)
 * You’re welcome!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Incorrect Regex in clearUnusedArrayDatafields’ is closed to new replies.

 * ![](https://ps.w.org/json-content-importer/assets/icon-256x256.png?rev=3464653)
 * [Get Use APIs - JSON Content Importer](https://wordpress.org/plugins/json-content-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-content-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-content-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/json-content-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-content-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-content-importer/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [berkux](https://wordpress.org/support/users/berkux/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/incorrect-regex-in-clearunusedarraydatafields/#post-6735225)
 * Status: resolved