Regular Expressions: Capture multiple groups using quantifier

后端 未结 2 539
野性不改
野性不改 2020-12-17 01:58

Consider the following code:






        
2条回答
  •  误落风尘
    2020-12-17 02:21

    Count again (8 vs 9). pat2 and pat3 are missing the space in between the two parts.

    Update: Additionally, I don't thing it's possible what you are trying to achieve by using match. See How can I match multiple occurrences with a regex in JavaScript similar to PHP's preg_match_all()? and use exec.

提交回复
热议问题