symCI c = psym (on (==) toLower c)

-- case insenstive match on a string
stringCI :: String -> RE Char String
stringCI = traverse symCI

validName :: RE Char String
validName = (:) <$> psym isAlpha <*> many (psym (\c -> isAlphaNum c || c `elem` ("-_[]" :: String)))

-- only matches a line at a time and not nested comments
-- | matches a blank line