Post History
Ruby, 128 bytes ->x,y{g=->c{c.chars.join" ?"} !x[y]&&(x.match?(/.+#{g[y]}.+/)||(0...(y.size-1)).any?{x[/^#{g[y[0.._1]]}.+#{g[y[(_1+1)..]]}$/]})} Attempt This Online! bookends ar...
Answer
#1: Initial revision
# [Ruby](https://www.ruby-lang.org/), 128 bytes ```ruby ->x,y{g=->c{c.chars.join" ?"} !x[y]&&(x.match?(/.+#{g[y]}.+/)||(0...(y.size-1)).any?{x[/^#{g[y[0.._1]]}.+#{g[y[(_1+1)..]]}$/]})} ``` [Attempt This Online!](https://ato.pxeger.com/run?1=ZVFdb9owFNVe_StuzVQlwzHlbZoEKIOoRIU4so1QFaVdFkGhpRSRIMVNIu1_7AVN24_qfs0uH9Ie-uLrc-7xuUe-P39vd9_N_te882eXz53Pbz-cbsFM-dBxummZ8nSRbDP--LJcU-jRmlwUkYkvL62CPyd5uuhZLd5slA9I1rzZsqvKuuKcW4Zny9eZ07ZtnqxNryyi1t1RFmH7vh0f1Cds3bebbZtzpD624tquTzn-fvgWRTTf7vKF-UIZDYWQMBQT5TGQQ0GUH1yPPNDS7d8wUH7_htyKCYwnSsNAaEAgwVfgBgPoS6HUidGKwe1EakWUPrZGnivxvXYl0QLG6K7F2CN-AC6E6DpCJnBDGjMS0Xmyyo5p_HEoRehJOObBC9Z3kQ5Ik3DkBkiilacZIHGYpdF9-n_wVMBXXw4UTH09BIF6pfE8ZAk8Gsd8lqSLsnpiRUU2uzwDStkTKfhquZ5l56apTMfgul6eN2dNozQ1OF1olPPoEy5ks1rmFmVA7bimpD5_9H5_qv8A) bookends are found with a constructed regex that takes most of the bytes.