- 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.
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動畫與游戲編程
- Git Version Control Cookbook
- Visual FoxPro程序設計教程
- Getting Started with PowerShell
- Spring Boot+Spring Cloud+Vue+Element項目實戰:手把手教你開發權限管理系統
- Mastering Python High Performance
- 精通MATLAB(第3版)
- Spring核心技術和案例實戰
- Python深度學習:模型、方法與實現
- Emgu CV Essentials
- Processing創意編程指南
- Laravel Application Development Blueprints
- GitHub入門與實踐
- C++程序設計教程
- 創意UI Photoshop玩轉移動UI設計