can anyone php expert help me to detect this [$string=\n\n(\n\n52556\n\n)] in php via Regex because i want to remvoe form this line now : Domino Developer \n\n(\n\n52338\n\n) Reston my requirement : Domino Developer Reston $string=\n\n(\n\n52556\n\n)
This is just a quick way, that I would use <?php $now = "Domino Developer \n\n(\n\n52338\n\n) Reston"; // lets remove what you dont't want \n\n(\n\n52338\n\n) leaving letters and spaces only $now = preg_replace("#[^A-Za-z ]#", "", $now); // opps we ended up with 2 spaces before "Reston", lets change that to 1 space $my_requirements = str_replace(' ',' ',$now); // All Done, this is what you wanted echo $my_requirements; // Domino Developer Reston ?> PHP: