I codice che vado a ritornare è una regex per estrapolare i tag di un codice css (senza media query) che poi devono essere cambiati in LAZYTIME + tag , il problema che il preg_replace ritorna vuoto anche se dai la regex funziona
Codice PHP:
$s = "body {background:crimson;overflow:hidden}[id*=xat],hr,table{display:none}";
$s = preg_replace('/([\w:*=.#-\s\[\]]+(?!([^\[\{]*[\]\}@])))/','LAZYTIME + ${1}',$s);
#tecnicamente dovrebbe ritornare:
/*
LAZYTIME + body {background:crimson;overflow:hidden}LAZYTIME + [id*=xat],LAZYTIME + hr,LAZYTIME + table{display:none}
*/
#invece ritorna null why?
Qualcuno ha idee?