go to previous page   go to home page   go to next page

Answer:

\s*[1-9]\d*\s*


Control and Other Characters

Short CutEquivalent
\t Tab
\n Newline
\r Carriage-return
\f Form-feed
\a Alert (bell)
\e Escape
\cX Control-X

In a program, where data might come from a disk file or other source, you might need to match characters other than the usual ones. For example, to match a "bell" character, use   \a  . To match a tab character, use   \t  . The table shows some others. These cannot be tested in the applet on the previous page because the applet does not let you enter these characters.

Users might enter control characters from the keyboard by holding down the "control" key and striking another key. For example, \cG matches control-G. This is the same character as "Alert" and corresponds to the same character specified as 0x07 in hexadecimal.

For much more about control characters, see the Wikipedia article here: Control Character.


QUESTION 3:

Do all characters correspond to an octal (or a hexadecimal) code that describes a bit pattern?