
22 Jan
2007
22 Jan
'07
1:22 p.m.
Can anyone help me understand this odd behavior in Text.Regex.Posix (GHC 6.6)? Prelude Text.Regex.Posix Text.Regex> subRegex (mkRegex "\\^") "he\350llo" "@" "he@llo" Why does /\^/ match \350 here? Generally Text.Regex.Posix seems to work fine with unicode characters. For example, \350 is treated as a single character here: Prelude Text.Regex.Posix Text.Regex> subRegex (mkRegex "e.l") "he\350llo" "@" "h@lo" The problem is specific to \350 and doesn't happen with, say, \351: Prelude Text.Regex> subRegex (mkRegex "\\^") "he\351llo" "@" "he\351llo" Is this a bug, or just something I'm not understanding? John