Handle escapes in regex literals