Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators?

后端 未结 3 1777
情深已故
情深已故 2020-11-28 16:36

Is there a regex flavor that allows me to count the number of repetitions matched by the * and + operators? I\'d specifically like to know if it\'s

3条回答
  •  感动是毒
    2020-11-28 17:13

    how about taking "pref ([a-z]+) suff"

    then use groups to capture that [a-z]+ in the bracket and find its length?

    You can use this length for subsequent matching as well.

提交回复
热议问题