Say I have a multiline string like
A: 51
B: 221
C: 45
And I want to replace it to get
A: $51
B: $221
C: $45
I tried
preg_replace("/[\d*][^0-9]*/","$currency$0",$pricelist);
but that prepends the currency symbol before every digit instead of every number. I also tried
preg_replace("/[\d]*/","$currency$0",$pricelist);
but that surrounds the amount with two currency symbols.