Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the non-printing characters in regular expressions

Shulou Source: shulou.com Published: 2022-06-03 09:15:46 11月15日 Update

This article will explain in detail what are the non-printing characters in regular expressions. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Non-printing character

There are many useful non-print characters that must be used occasionally. The following table shows the escape sequences used to represent these non-print characters:

The character meaning\ cx matches the control character indicated by x. For example,\ cM matches a Control-M or carriage return. The value of x must be one of Amurz or aMuz. Otherwise, c is treated as a literal'c 'character. \ f matches a feed character. Equivalent to\ x0c and\ cL. \ nmatches a newline character. Equivalent to\ x0a and\ cJ. \ r matches a carriage return. Equivalent to\ x0d and\ cM. \ s matches any white space characters, including spaces, tabs, page breaks, and so on. Equivalent to [\ f\ n\ r\ t\ v]. \ s matches any non-white space character. Equivalent to [^\ f\ n\ r\ t\ v]. \ t matches a tab. Equivalent to\ x09 and\ cI. \ v matches a vertical tab. Equivalent to\ x0b and\ cK. This is the end of this article on "what are the non-printing characters in regular expressions?". I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, please share it for more people to see.

Tags: Characters equivalence tabs articles tabs rules expressions Central Africa more blanks good practical content meaning sequences newline characters articles useful knowledge spaces Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Microsoft Shulou Tech Info Shulou Information MariaDB