Online Promoters™ :: Web Development made simple

Tag Archives: remove parenthesis

Replace ( parentheses ) with PHP Parenthesis Regex

As I could not find a proper way to remove parenthesis from a string I came to the following solution: The best way until today® is to use preg_replace $str = 'Hard Disk (HDD)'; $job = preg_replace('/([()]+)/i' ,'',$str); var_dump($job); Like always if i missed something just drop me some lines below.

by Webmaster