Streaming regex based lexer