letter → /[a-z]/
char 'a' → /a/
string "hoge" <|> string "huga" → /hoge/
try(string "hoge") <|> string "huga" → /hoge|huga/
many (char '@') → /@/
many1 (char '@') → /@+/
sepBy (string "hoge") (char ',') → /(hoge(,hoge))?/
sepBy1 (string "hoge") (char ',') → /hoge(,hoge)/
sepEndBy (string "hoge") (char ',') → /(hoge(,hoge))?,?/
sepEndBy1 (string "hoge") (char ',') → /hoge(,hoge)*,?/
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme