php: best proceed mislay calm within parenthesis?


what's best/most fit proceed mislay calm set between parenthesis? contend i wanted twine "text" twine "ignore all solely (text)" many fit feeling possible.



so far, best i've adult this:



$fullstring = "ignore all solely (text)";
$start = strpos('(', $fullstring);
$end = strlen($fullstring) - strpos(')', $fullstring);

$shortstring = substr($fullstring, $start, $end);


is there improved proceed this? i know whole controlling regex tends reduction efficient, nonetheless unless i devaluate array duty calls, maybe best approach? thoughts?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members