php: regex remove bracket in string

Posted by apis17 on Stack Overflow See other posts from Stack Overflow or by apis17
Published on 2010-06-14T06:12:11Z Indexed on 2010/06/14 6:22 UTC
Read the original article Hit count: 241

Filed under:
|
|

hi,

similiar like this example, http://stackoverflow.com/questions/1336672/php-remove-brackets-contents-from-a-string i have no idea to replace

$str = '(ABC)some text'

into

$str = 'ABC';

currently use $str = preg_replace('/(.)/','',$str); but not works. how to fix this?

© Stack Overflow or respective owner

Related posts about php

Related posts about regex