官术网_书友最值得收藏!

Escaping inside a character class

In the Java regex engine, all the special regex metacharacters lose their special meaning inside a character class except the ^ (carrot), - (hyphen), ] (right square bracket), and \ (backslash) characters.

Inside a character class, the hyphen also does not need to be escaped when used as the first or last character, since a character range requires both the left-hand side and the right-hand side characters. Similarly, ^ (carrot) needs to escaped only when used as the first character inside a character class.
主站蜘蛛池模板: 财经| 曲阜市| 桦甸市| 长汀县| 汝州市| 通化市| 龙陵县| 佛冈县| 射阳县| 云阳县| 松溪县| 康马县| 珠海市| 句容市| 乃东县| 颍上县| 留坝县| 应城市| 嫩江县| 太保市| 滁州市| 万山特区| 长治市| 宁都县| 大埔县| 横山县| 丰原市| 莫力| 理塘县| 榕江县| 秦安县| 黔东| 宿州市| 朝阳县| 和静县| 北流市| 荆门市| 凤台县| 合江县| 湖南省| 胶州市|