@
honjow #32
and none of these …
✔xxxx (no match)
✔xxxxxx (no match)
✔xxxxxxxx (no match)
✔xxxxxxxxx (no match)
✔xxxxxxxxxx (no match)
✔xxxxxxxxxxxx (no match)
✔xxxxxxxxxxxxxx (no match)
✔xxxxxxxxxxxxxxx (no match)
✔xxxxxxxxxxxxxxxx (no match)
✔xx …(18)… xx (no match)
✔xx …(20)… xx (no match)
✔xx …(21)… xx (no match)
✔xx …(22)… xx (no match)
✔xx …(24)… xx (no match)
✔xx …(25)… xx (no match)
✔xx …(26)… xx (no match)
✔xx …(27)… xx (no match)
✔xx …(28)… xx (no match)
✔xx …(30)… xx (no match)
✔xx …(32)… xx (no match)
^(?!(xx+)\1+$)
https://sm.ms/image/E1Ppn3IyQJBC9HZ注意上面的粉红色光标,断言后面的 xx...xx 串不能被 2 个以上的 xx+ 组成的重复串完全匹配,其中 xx+ 视作因数(数值>1 ),而反引用使得它不能被本身匹配。
联系质数的数学定义:大于 1 的自然数中,除了 1 和它本身以外不再有其他因数的自然数。
从上面的粉红光标处出发,再加两个 xx (确保自然数大于 1 )即为答案
Match all of these …
✔xx
✔xxx
✔xxxxx
✔xxxxxxx
✔xxxxxxxxxxx
✔xxxxxxxxxxxxx
✔xxxxxxxxxxxxxxxxx
✔xxx …(18)… xx
✔xxx …(22)… xx
✔xxx …(28)… xx
✔xxx …(30)… xx
✔xxx …(36)… xx
✔xxx …(40)… xx
✔xxx …(42)… xx
✔xxx …(46)… xx
✔xxx …(52)… xx
✔xxx …(58)… xx
✔xxx …(60)… xx
✔xxx …(66)… xx
✔xxx …(70)… xx
^(?!(xx+)\1+$)xx