Here is my string.
$text = 'I am [pitch = "high"]Rudratosh Shastri[endpitch]. what is your name ? how are you? sorry [pause ="3000"] i can not hear you ?[rate="-70.00%"] i still can\'t hear you[endrate] ? [rate="+50.00%"]why i can\'t hear you[endrate] ?';
I want to replace [pause = "3000"] by <break time="3000ms">
I have written following regex but it is selecting till the last "]
\[pause.*\"(\d+)\".*\"]
PHP : $text = preg_replace("/\[pause.*\"(\w+)\".*\"]/", '<break time="$1ms"/>', $text);
If I were to find a solution where the regular expression only selects 'any number'
any number"]
my problem would be solved.
But I am not able to find how to do it.
Do you have any suggestions ?