made the pattern matchin more robust. patterns with arbitrary regex relevant characters will still break stuff