Tried solving today's #adventofcode using only regex, and it turns out that it's not easy to match a string containing any character consecutively repeated exactly 2 times (but no more).

For example, I want to match "abccd", but not "abcccd".

Follow

@ihabunek needs backreferences and {} and NOT but it has been a while since I got crazy creative in regex

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.