I am trying to remove the "-" character at the end of every line:
$text = "abc - xyz
abc-
-xyz
";
It is not producing the desired result as of now.
I am using the following PHP:
$text = preg_replace("/\-$/m", "*", $text);
The desired result:
$text = "abc - xyz
abc*
-xyz
";
or a similar solution.