•        // Remove Comments
            $regex = array("<code>^([\t\s]+)</code>ism"=>'',"<code>^\/\*(.+?)\*\/</code>ism"=>"","<code>([\n\A;]+)\/\*(.+?)\*\/</code>ism"=>"$1","<code>([\n\A;\s]+)//(.+?)[\n\r]</code>ism"=>"$1\n","<code>(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+</code>ism"=>"\n");
            $css = preg_replace(array_keys($regex),$regex,$css);

    I think this regex statement needs to be fixed, it seems to throw an error on php 7.4

    Related issue can be found here:https://stackoverflow.com/questions/24764212/preg-match-compilation-failed-invalid-range-in-character-class-at-offset

    I’m not a regex master…but maybe you guys are?

    Error message:
    PHP Warning: preg_replace(): Compilation failed: escape sequence is invalid in character class at offset 4 in /srv/users/cool/apps/cool/public/wp-content/plugins/resume-builder/includes/class.resume-builder-enqueues.php on line 59

    • This topic was modified 4 years, 10 months ago by jiggaman.
  • The topic ‘Regex statement not working with php 7.4’ is closed to new replies.