How to create a regex that will match an arbitrary sequence of spaces and tabs

前端 未结 4 1043
一生所求
一生所求 2020-12-29 01:33

Could anyone help me to assemble a pattern that matches an arbitrary sequence of spaces and tabs?

4条回答
  •  天命终不由人
    2020-12-29 02:15

    To piggy-back on @Justin Morgan's answer, note that according to https://regex101.com/, \s+ is equal to [\r\n\t\f\v ]+.

    Therefore, if your system doesn't support the \s+ (or \s*) construct, use [\r\n\t\f\v ] in place of the \s part instead.

提交回复
热议问题