Regular expressions 5. Special control characters
|
|
Special control characters in a regular expression specify characters that are difficult to type.
- \a alert (bell).
- \b backspace.
- \e ASCII escape character.
- \f form feed (new page).
- \n newline.
- \r carriage return.
- Example : a search for "\r\n" followed by a replace "\r" changes Windows text files to Macintosh text files.
- Example : a search for "\r" followed by a replace "\n" changes Macintosh text files to Unix text files.
- Example : a search for "\r\n" followed by a replace "\n" changes Windows text files to Unix text files.
- \t horizontal tab.
- \v vertical tab.
Links to this page
© djmw 20010708