improved tag matching, got escapes working.