regex - 正则表达式: match any word until first space

标签 regex

我有以下行:

hshd    household   8/29/2007   LB

我想匹配第一个空格(空白)之前的任何内容。所以,在这种情况下,我想回来

hshd

最佳答案

([^\s]+)

作品

关于regex - 正则表达式: match any word until first space,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1400431/

相关文章:

java - 正则表达式在 JAVA 中抛出异常,在 PHP 中工作

java - MongoDB $regex 查询 "end with"特定字符

python - 将 perl 正则表达式转换为 python 正则表达式

php - 全名的正则表达式模式

regex - Shell:如何用保存的变量值替换文本的某些内容

regex - float 的正则表达式

python - 如何使用两组正则表达式 url?

java - 正则表达式——匹配 ' but not ' '

regex - 如何匹配正则表达式中的 n 个单词?

Python 正则表达式 finditer 的第二组被第一个捕获组忽略