Can someone explain how this interaction in ghci is possible?
*Main Text.Regex.Posix> "d1" =~ "\\d" :: String
"d"
*Main Text.Regex.Posix> "d1" =~ "\\d" :: Int
1
I thought it \dcorresponded to a number, so I do not understand how it can correspond to a character d, but not to the character 1present in the string.
Note. Using ghci 7.10.3
source
share