Re: preg_replace - I don't have a clue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/12/06, Frank Bax <fbax@xxxxxxxxxxxx> wrote:
>
> reg_replace( '  (\d+\$)', '+$0', $prop );       /* results in
> dollar-alpha-space-space-plus-digits-dollar */
> $Fencing  +11$Lumber  +17$Weight: 317 Stones$Energy Resist 2%$



Try:
preg_replace( '/ (\d+\$)/', '+$1', $prop );



--
Anthony Best

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux