In regular expressions. How to use metacharacters
This article mainly introduces regular expressions. How to use metacharacters, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Regular expression. Symbol metacharacter:
Dot (.) Metacharacters can match any character except carriage return (\ r) and newline character (\ n).
Grammatical structure:
Constructor mode:
New RegExp (.)
Object direct quantity method:
[JavaScript] View copy code running code in plain text
/. /
Browsers support:
IE browsers support this metacharacter.
Firefox browser supports this metacharacter.
Google browser supports this metacharacter.
Note:
In browsers above IE9 or other standard browsers, the decimal point can match any character except the carriage return (\ r) and the newline character (\ n).
In browsers below IE8, the decimal point can match any character except the newline character (\ n).
Example code:
Example 1:
Var str= "antzone