- Java 9 Regular Expressions
- Anubhava Srivastava
- 88字
- 2021-07-02 18:58:37
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.
推薦閱讀
- 零基礎學Visual C++第3版
- Elastic Stack應用寶典
- Java:Data Science Made Easy
- JavaScript前端開發與實例教程(微課視頻版)
- Mastering LibGDX Game Development
- PLC編程與調試技術(松下系列)
- C語言課程設計
- Machine Learning for OpenCV
- Java高并發編程詳解:深入理解并發核心庫
- LabVIEW數據采集
- Drupal Search Engine Optimization
- Python 3快速入門與實戰
- SQL Server實例教程(2008版)
- R語言編程基礎
- Mastering Responsive Web Design