Character class

xiaoxiao2021-03-06  20

The character class is a character set, and if any of the characters in the character set matches, it will find the match. The following table summarizes the character matching synthesis.

Character class description. Match any of the characters other than / n. If you have modified with the SingLine option, the descript character will match any character. For more information, see the regular expression option. [AEIOU] matches any single character included in the specified character set. [^ aeiou] matches any single character that is not in the specified character set. [0-9A-FA-F] Use a linked font size (-) to allow the specified continuous character range. / p {name} matches any character in the named character class specified by {name}. The supported name is a Unicode group and block range. For example, LL, ND, Z, ISGREEK, ISBOXDRAWING. / P {name} matches the text that is not included in the group and block range specified in {Name}. / w matches any word character. Equivalently Unicode Character Class [/ P {LL} / P {lu} / p {lt} / p {lo} / p {nd} / p {pc}]. If you specify a behavior that meets ECMAScript with an ECMAScript option, / W is equivalent to [A-ZA-Z_0-9]. / W matches any non-word character. Equivalent to Unicode category [^ / p {ll} / p {lu} / p {lt} / p {lo} / p {nd} / p {pc}]. If you specify a behavior that meets ECMAScript with an ECMAScript option, / W is equivalent to [^ A-ZA-Z_0-9]. / s matches any blank character. Equivalent to Unicode character category [/ f / n / r / t / v / x85 / p {z}]. If you specify a behavior that meets ECMAScript with an ECMAScript option, / s is equivalent to [/ f / N / R / T / V]. / S matches any non-blank character. Equivalent to Unicode character category [^ / F / N / R / T / V / X85 / P {z}]. If you specify a behavior that meets ECMAScript with an ECMAScript option, / s is equivalent to [^ / F / N / R / T / V]. / d Match with any decimal number. Equivalent to / p {nd} (for Unicode Category) and [0-9] (for non-Unicode categories) ECMAScript behavior. / D Match any non-numeric. Equivalent to / p {nd} (for Unicode categories) and [^ 0-9] (for non-Unicode categories) ECMAScript behavior.

You can use the getUnicodecategory method to find the Unicode category to which a character belongs.

For more information about UNICODE character categories, see Document Unicode Data File Format (Unicode Data File Format), this document can be from the UNICODE Technical Committee (UTC) Web site http://www.unicode.org/public/unidata/unicodedata .html is obtained.

See

Regular expression language element | getunicodecategory | Regular expression option

转载请注明原文地址:https://www.9cbs.com/read-42775.html

New Post(0)