ereg_replace问题 [英] ereg_replace question
本文介绍了ereg_replace问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道这究竟是什么:ereg_replace(" [^ 0-9。]","",
$ value )
这会导致负数输掉它的减号吗?
例如,如果@value是负2300.00(-2300.00),那么在上面之后
功能,还是= -2300.00?
谢谢
Hi,
Does anyone know what exactly this does: ereg_replace("[^0-9.]", "",
$value)
would this be responsible for a negative number losing it''s minus sign?
e.g, if @value is minus 2300.00 (-2300.00), then after the above
function, is it still = -2300.00?
thanks
推荐答案
价值)
这会导致负数输掉它的减号吗?
例如,如果@value是负2300.00(-2300.00),那么之后以上
功能,还是= -2300.00?
谢谢
value)
would this be responsible for a negative number losing it''s minus sign?
e.g, if @value is minus 2300.00 (-2300.00), then after the above
function, is it still = -2300.00?
thanks
On Thu, 2006年5月18日10:12:53 -0700,fakefaker123写道:
On Thu, 18 May 2006 10:12:53 -0700, fakefaker123 wrote:
有谁知道这究竟是什么:
分解:
ereg_replace("
使用简单的正则表达式替换
[
中的一个角色以下范围
^
除了......之外的任何东西...
0-9
数字0-9
..
一个句号或小数点
]
结束范围
","",
使用空字符串(即删除)
Hi,
Does anyone know what exactly this does:
Broken down:
ereg_replace("
Replace using simple regular expressions
[
A character in the following range
^
Anything but...
0-9
The digits 0-9
..
A full stop or decimal point
]
End of the range
", "",
With an empty string (i.e. delete)
value)
在
value)
In
中
这篇关于ereg_replace问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文