I need to return with php value from strings('-1.00','+2.00','-6.00')
value like '-1'
, '+2'
, '-6'
.
Thank you!
Asked
Active
Viewed 63 times
-5

herohuyongtao
- 49,413
- 29
- 133
- 174

user3338412
- 1
- 1
- 2
-
1[Simply add `0` to it](https://eval.in/104550). – Amal Murali Feb 22 '14 at 14:25
-
Regex is definitely not the perfect tool for the job, but even then, here you are : `([+\-][\d]+)(?=\.)`. Demo : http://regexr.com?38bo3 – Dr.Kameleon Feb 22 '14 at 18:01