Match Nonprintable Characters

来源:互联网 发布:淘宝返现金怎么弄 编辑:程序博客网 时间:2024/05/16 07:06

1. Requirement

Match a string of the following ASCII control characters:

bell, escape, form feed, line feed, carriage return, horizontal tab, vertical tab


2. Code

-----------------------------------------------------------------------------------------------------

|  Control characters    |  representation  way |      control way  |   7-bit way     |

-------------------------------------------------------------------------------------------------------

|          bell                       |               \a                     |            \cG         |          \x07        |

--------------------------------------------------------------------------------------------------------

|        escape                  |               \e                     |            --            |          \x1B         |

--------------------------------------------------------------------------------------------------------

|       form feed               |                \f                      |           \cL          |         \x0C          |

--------------------------------------------------------------------------------------------------------

|   line feed(newline)   |                 \n                    |            \cJ         |          \x0A           |

--------------------------------------------------------------------------------------------------------

|     carriage return       |                  \r                    |            \cM        |         \x0D            |

---------------------------------------------------------------------------------------------------------

|     horizontal tab         |                  \t                    |             \cI         |          \x09             |

---------------------------------------------------------------------------------------------------------

|       vertical tab            |                  \v                   |              \cK       |          \x0B            |

---------------------------------------------------------------------------------------------------------


3. Ascii


0 0
原创粉丝点击