On Saturday 12 November 2011, 11:30:39, Shakthi Kannan wrote: > I then tried a simpler example: > > Prelude Text.Regex> subRegex (mkRegex "e") "hello" "\\1" > "h*** Exception: Ix{Int}.index: Index (1) out of range ((0,0)) > > What could I be missing? Maybe the backreferences numbering starts at 0? Worth a try.