Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Search 将0替换为-9_Search_Str Replace - Fatal编程技术网

Search 将0替换为-9

Search 将0替换为-9,search,str-replace,Search,Str Replace,我的数据包含我想用-9删除的0,但不是像220或120这样的数据点。怎么做?例如,数据如下所示: M1 M2 M3 M4 120 0 125 0 0 123 123 0 12300123 到 M1 M2 M3 M4 120 -9 125 -9 -9 123 123 -9 123-9-9 123您将搜索“0”并替换为“-9”使用正则表达式将“0”替换为“9”。如果你发了一个问题,也用什么语言解释。你能更清楚一点吗?另外,您使用的语言是什么?注意:空格可以防止数字超过一个数字(

我的数据包含我想用-9删除的0,但不是像220或120这样的数据点。怎么做?例如,数据如下所示: M1 M2 M3 M4 120 0 125 0 0 123 123 0 12300123

M1 M2 M3 M4 120 -9 125 -9 -9 123 123 -9
123-9-9 123

您将搜索
“0”
并替换为
“-9”

使用正则表达式将“0”替换为“9”。如果你发了一个问题,也用什么语言解释。你能更清楚一点吗?另外,您使用的语言是什么?注意:空格可以防止数字超过一个数字(假设这是一个字符串)。