<?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';
You have javascript disabled. You will not be able to edit any code.