Title: PHP 7.3 &#8220;preg_replace&#8221; error
Last modified: July 17, 2019

---

# PHP 7.3 “preg_replace” error

 *  Resolved [detrax](https://wordpress.org/support/users/detrax/)
 * (@detrax)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/)
 * Something seems to be worth looking at (with PHP 7.3):
 * preg_replace(): Compilation failed: escape sequence is invalid in character class
   at offset 4 in […] plugins/wp-typography/includes/wp-typography/components/class-
   public-interface.php on line 307′

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

 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/#post-11739141)
 * [@detrax](https://wordpress.org/support/users/detrax/) Thank you for the bug 
   report. Which versions of wp-Typography and PHP 7.3 are you using exactly?
 *  Thread Starter [detrax](https://wordpress.org/support/users/detrax/)
 * (@detrax)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/#post-11739601)
 * They are those two:
 * PHP: PHP 7.3.7
    wp-typography : Version 5.5.4
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/#post-11739702)
 * Thank you. I’ve not been able to replicate that error on my own installation 
   of PHP 7.3.7, but from looking at the regular expressions it seems it might have
   always been incorrect, but the syntax issue only pops up with PCRE2 as used by
   PHP 7.3. (And the exact behavior might also depend on some system library version.)
 * I’ll look into it tonight.
 *  Thread Starter [detrax](https://wordpress.org/support/users/detrax/)
 * (@detrax)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/#post-11739748)
 * Thanks for your quick answer. If I might be of any assistance (eg. test), let
   me know.
 *  Plugin Author [pepe](https://wordpress.org/support/users/pputzer/)
 * (@pputzer)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/#post-11751644)
 * Will be fixed in the next release.

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

The topic ‘PHP 7.3 “preg_replace” error’ is closed to new replies.

 * ![](https://ps.w.org/wp-typography/assets/icon.svg?rev=2663995)
 * [wp-Typography](https://wordpress.org/plugins/wp-typography/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-typography/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-typography/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-typography/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-typography/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-typography/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [pepe](https://wordpress.org/support/users/pputzer/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/php-7-3-preg_replace-error/#post-11751644)
 * Status: resolved