def validation_regex
      n = @kat.results[@page].size
      commands = "[#{ 'i' if hide_info? }#{ 'n' if next? }#{ 'p' if prev? }q]|"
      _01to09  = "[1-#{ [n, 9].min }]"
      _10to19  = "#{ "|1[0-#{ [n - 10, 9].min }]" if n >  9 }"
      _20to25  = "#{ "|2[0-#{ n - 20 }]" if n > 19 }"

      /^(#{ commands }#{ _01to09 }#{ _10to19 }#{ _20to25 })$/
    end
def validation_regex
      n = @kat.results[@page].size
      commands = "[#{ 'i' if hide_info? }#{ 'n' if next? }#{ 'p' if prev? }q]|"
      _01to09  = "[1-#{ [n, 9].min }]"
      _10to19  = "#{ "|1[0-#{ [n - 10, 9].min }]" if n >  9 }"
      _20to25  = "#{ "|2[0-#{ n - 20 }]" if n > 19 }"

      /^(#{ commands }#{ _01to09 }#{ _10to19 }#{ _20to25 })$/
    end
Create a regex to validate the user's input