Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.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
Regex 使用正则表达式删除空格和数字_Regex_Excel - Fatal编程技术网

Regex 使用正则表达式删除空格和数字

Regex 使用正则表达式删除空格和数字,regex,excel,Regex,Excel,我在excel中有一列数据,如下所示: aast<space>1<space> qusw<space>3<space> umw<space>18<space> arst<space>50<space> 我在excel和notepad2++中尝试了regexp,但没有成功地使用以下方法: aast qusw umw arst ^\s+[09]\s+$ 有人能帮忙吗?谢谢取而代之的是删除你不需要的东

我在excel中有一列数据,如下所示:

aast<space>1<space>
qusw<space>3<space>
umw<space>18<space>
arst<space>50<space>
我在excel和notepad2++中尝试了regexp,但没有成功地使用以下方法:

aast
qusw
umw
arst
^\s+[09]\s+$

有人能帮忙吗?谢谢

取而代之的是删除你不需要的东西。替换

[0-9 ]*
一无所有

(.*)\s[0-9]+\s

在动作

中,您可以考虑该列中的文本到列,其中的空格作为分隔符,然后只删除所有列,但首先删除。p> 或使用以下公式:

=LEFT(A1,FIND(" ",A1)-1)
试试这个:

 String regex = "[^\\s0-9\\<\\>\\s]";
String regex=“[^\\s0-9\\\\s]”;

谢谢大家!使用excel函数“文本到列”解决了此问题。非常感谢你的帮助!非常感谢pnuts。我会注意到pnuts。再次感谢。