I wrote most of an nfa (and dfa) machine in c# to try and use regex type patterns over non-character input streams. Backtracking isn't exactly fun to implement but i managed it so it can't be ...