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 hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?