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
原文链接:https://www.f2er.com/regex/361914.html