3 ms·
^(?!.*(.)(.)\2\1) You may also need to fill in the places where it could be anything. The above worked on abba for me. BTW a double space indent then formats
by josephlord 13y ago
^(?!.*(.)(.)\2\1)
You may also need to fill in the places where it could be anything. The above worked on abba for me.
BTW a double space indent then formats as code on HN I think.
- Procrastes 13y agoYour approach scores higher, but it only matches the (imaginary) space before the "good" words. I went with: ^(?!.(.)(.)\2\1).$ with the thought that if I really wanted those matches I would want the whole strings. Fun game!
- Procrastes 13y agooops, ^(?!.*(.)(.)\2\1).*$ With proper formatting hopefully.