Little regex problem
Posted: Sat Jan 09, 2010 10:20 pm
Hi All,
I am running into a little regex problem. Here's an example of what I have sofar:
It's probably simple what I want to do. All I want is the text to split title and mytest into 2 arrays without the parenthesis. What I have now on code outputs:
title
(mystest
So I basically would like to know how i can get that final ( out of my output.
Help is highly appreciated.
I am running into a little regex problem. Here's an example of what I have sofar:
Code: Select all
$string = "title(mytest)";
preg_match_all('/.*?[^\()]+/i',$string,$matches);
title
(mystest
So I basically would like to know how i can get that final ( out of my output.
Help is highly appreciated.