Difference between * and + regex

前端 未结 6 1909
你的背包
你的背包 2020-11-22 02:18

Can anybody tell me the difference between the * and + operators in the example below:

[<>]+ [<>]*

6条回答
  •  囚心锁ツ
    2020-11-22 03:00

    * means zero-or-more, and + means one-or-more. So the difference is that the empty string would match the second expression but not the first.

提交回复
热议问题