This is a reverse-challenge of [this](https://codegolf.stackexchange.com/questions/203893/bl-lu-ur-rr-ry-yv-vi-is-si-io-on-blur-the-text/) challenge. Given an input string, check whether the string is blurry. ## What's a blurry string? Take a non-blurrified string `abc` as an example. You repeat every character of this twice: ``` aabbcc ``` And then insert spaces at every odd-even index. ``` a ab bc c ``` Then, remove the preceding 2 and succeeding 2 extra characters. ``` ab bc ``` As an example, all of these strings are blurry (the empty line stands for an empty string): ``` "a" -> "ab" ->ab "abc" ->ab bc "abcd"->ab bc cd ... ``` ## Specification * The input string consists purely of printable ASCII characters. The only whitespace it will contain is the space character. * You don't have to remove extra characters before the check. * Your output can consist of any trailing whitespace, as long as it's possible to tell a truthy result from a falsy result. ## Test cases ``` "" -> True "ab" -> True "ab bc" -> True "ab bc cd"-> True "a" -> False "abc" -> False "ab bc cd"-> False "ab#bc#cd" -> False "abbccd" -> False "a ab bc cd"-> False "a a ab b b"-> False "ba cb dc" -> False "ba bc dc" -> False ```
# ~~82~~ 74 bytes lambda s:len(s)//3*' '==s[2::3]and(len(s)%3>1or' '>s)*(s[1:-1:3]==s[3::3]) [Try it online!][TIO-kgnxotgo] [TIO-kgnxotgo]: https://tio.run/##fY9Bi8MgEIXv@RWDYYmWLiX1JqTHnvewt7SHURMasBoy2UN/fVZjWlhYKiLfY97wnuNjvgUvl765LA7v2iKQcp3nJA4Huaugahpqj0rJK3rL8@RDnuowxdmJxI5TW6vPOhqSUyanWEr4nn7m26PowwQEgwfO2B4Y6vyCNi8AY5lQBcQzToOfOWdnHFxnk@MLiSKJVofgeB/DxXUPFG83NtVlrkRR5K0IJZzR0Z9QzDHPtBSX8lZValM@WZuN4NUpq1XDWlsjGA3WbPxv861vdGx/eNN8@QU "Python 3 – Try It Online"
# [Jelly], 16 bytes ḲµL=2)ẠaṪ⁼Ḣ}ɗƝẠ$ [Try it online!][TIO-khnmmkh4] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-khnmmkh4]: https://tio.run/##ATEAzv9qZWxsef//4biywrVMPTIp4bqgYeG5quKBvOG4on3Jl8ad4bqgJP///2FiIGJjIGNk "Jelly – Try It Online" ## Explanation ḲµL=2)ẠaṪ⁼Ḣ}ɗƝẠ$ Main monadic link Ḳ Split on spaces µ Use as new argument ) Map L Length =2 Equals 2? Ạ All a And [short-circuit] $ ( Ɲ Apply to all pairs of neighboring elements ɗ ( Ṫ Last element of left argument ⁼ Equals? Ḣ} First element of right argument ɗ ) Ạ All? $ (