3 ms·
http://regexcrossword.com/challenges/intermediate/puzzles/5 http://regexcrossword.com/challenges/intermediate/puzzles/5 Anyone understand what (.)*DO\1 should
by baby 12y ago
http://regexcrossword.com/challenges/intermediate/puzzles/5 http://regexcrossword.com/challenges/intermediate/puzzles/5
Anyone understand what (.)*DO\1 should match?
edit: Okay, I was writting 0 instead of O that's why it wasn't working.
- zatkin 12y agoAnything 0 or more times backreferenced onto the end of the string "DO", is my guess. So, for example: DO DONUT DOG
- cataflam 12y ago. -> any character (.) -> any character, grouped to reference it, since it's the first group it's referenced as \1 (.)* -> that, 0 or more times (.)* DO -> any character 0 or more times, followed by DO (.)* DO\1 -> any character 0 or more times, followed by DO, and the same character as in the beginning
- eru 12y agoBy the way, the backreferences make the game non-regular.