regular expression input text processing