1
chrawsl 2022-11-10 16:54:44 +08:00
![]( https://p.sda1.dev/8/c5e7997ff28e32b95b1d4d3bf1949546/image.png)
^(?:(?:\d|\{\d\,\d\}\:\d)\+)*(?:\d|\{\d\,\d\}\+)$ |
2
chrawsl 2022-11-10 16:56:01 +08:00
@chrawsl
思路是分两块,首先 (?:\d|\{\d\,\d\}\+) 匹配末尾的 A 或者 B ,前面的都应该是 A/B + 的形式,用 (?:(?:\d|\{\d\,\d\}\:\d)\+) 匹配,然后用 ^ $ 规定头和尾 |
3
yaphets666 OP @chrawsl 感谢
|