Fixing the pattern used in the regular expression for terminals to accept anything.