Regex whitespace word boundary

前端 未结 3 1003
醉梦人生
醉梦人生 2020-11-22 02:04

I have this expression

\\b[A-Za-z]+\\b

If I give abc@de mnop, it matches abc, de and mnop

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 02:35

    Regex word boundary doen't match(\b) matching and whitespace

    Only white in sample is

    abc@de mnop   
          ^
    

    Try \s([A-Za-z]+)\b

    where \s is the anchor, not a boundry at all

提交回复
热议问题