What does /^(a(?1)?b)$/ means in Regex?

前端 未结 0 727
暖寄归人
暖寄归人 2020-12-20 16:09

For /^(a(?1)?b)$/, it can match the pattern of ab, aabb, aaabbb, aaaabbbb etc.

(?1) recurses the 1st subpattern but why need to put "?" after i

相关标签:
回答
  • 消灭零回复
提交回复
热议问题