I am using the following regex
'/\@(.*)\((.*)\)/'
And I am trying to get @ONE(TWO) one and two from the expression. Which works as long as it's the only time that it can be found before an end of line (I think)
I am quite green with regex and I really cannot understand what I am doing wrong.
What I need is to be able to get all the ONE/TWO couples. Can you please help me.
I am working with PHP and the following function
$parsed_string = preg_replace_callback(
// Placeholder for not previously created article
// Pattern example: @George Ioannidis(person)
'/\@(.*)\((.*)\)/',
function ($matches) {
return $this->parsePlaceholders( $matches );
},
$string
);
The results I am getting from https://regexr.com