I have string
[test](test\\-test\\-abc) abcde\\-
I would like to have
[test](test-test-abc) abcde\\-
I need to replace \\- with - with regex/preg_replace.
Need to replace string only between parenthesis. I found a solution but it only replaces first occurance.
$result = preg_replace("/(\[.*?\])(\(.*?)(\\\\-)(.*?\))/", '$1$2-$4', $str);