I'm having some trouble with regexes in haskell. Specifically:
Prelude Text.Regex.Posix> "1" =~ "\d" :: Bool
<interactive>:1:10:
lexical error in string/character literal at character 'd'
Prelude Text.Regex.Posix> "1" =~ "\\d" :: Bool
False
Prelude Text.Regex.Posix> "1" =~ "\\\\d" :: Bool
False
Does Haskell not have the \d or \s or other such convenient escape codes? Yes, I know I can do [0-9] instead, but the escape codes can be so much more convienient for complex regexes. Am I missing something obvious here?
\\dor some variant of this as I am still struggling