3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'ABC (R+R) : Weldone boy (My Love)'; $variable = "ABC (R+R)"; //$variable = "ABC \(R\+R\)"; $pattern = "/\b$variable\b/i"; echo preg_match($pattern, $string)? 'matched' : 'not matched';

preferences:
25.4 ms | 404 KiB | 5 Q