How would you match a^n b^n c^n for n > 0 with PCRE?
The following cases should match:
abc
aabbcc
aaabbbccc
The following cases should not match:
abbc
aabbc
aabbbccc
Here's what I've "tried"; /^(a(?1)?b)$/gmx
but this matches a^n b^n for n > 0:
ab
aabb
aaabbb
Note: This question is the same as this one with the change in language.
Aucun commentaire:
Enregistrer un commentaire