I have to check several strings...the format of each string could be the following:
I-IVWM_Ask-21_(max_2h)
or
D-7849_DG303_(max_4h)
or
Aliante_Privato
I need to capture text in brackets, first part of string outside brackets and replace underscore with spaces.
I'm tring to use preg_match in PHP, as follow
preg_replace('/\([^)]*\)|[()]/', '', $string);
The code above remove string and brackets but leave underscore and doesn't capture the string inside brackets.
Any help to figure out my issue? Thanks