regular expression: match any word until first space

前端 未结 8 1115
情话喂你
情话喂你 2020-12-02 06:20

I have the following line:

hshd    household   8/29/2007   LB

I want to match anything that comes before the first space (whitespace). So,

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-02 06:26

    I think, a word was created with more than one letters. My suggestion is:

    [^\s\s$]{2,}
    

提交回复
热议问题