preg_replace how to replace only matching xxx($1)yyy pattern inside the selector preg_replace how to replace only matching xxx($1)yyy pattern inside the selector php php