This regular expression-- "[a-zA-Z0-9\ ]$" can handle all text which has alphanumeric characters and space. But it cannot handle a new line. I want to handle newlines and tabs as well. Are there any special symbols for them?
Just like for PHP, \t can be used to denote tabs.
As for newlines, read up on pattern modifiers.
depending on what exactly you are doing, \s might be an alternative, used instead of the space in your pattern.
\s is a built-in character class for whitespace including newline characters and tabs.