regular expression: match any word until first space

前端 未结 8 1089
情话喂你
情话喂你 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

    Perhaps you could try ([^ ]+) .*, which should give you everything to the first blank in your first group.

提交回复
热议问题