Using explicitly numbered repetition instead of question mark, star and plus

后端 未结 4 2124
谎友^
谎友^ 2020-11-21 11:00

I\'ve seen regex patterns that use explicitly numbered repetition instead of ?, * and +, i.e.:

Explicit            Sho         


        
4条回答
  •  感情败类
    2020-11-21 11:42

    • They're all identical unless you're using an exceptional regex engine. However, not all regex engines support numbered repetition, ? or +.

    • If all of them are available, I'd use characters rather than numbers, simply because it's more intuitive for me.

提交回复
热议问题