- Java 9 Regular Expressions
- Anubhava Srivastava
- 85字
- 2021-07-02 18:58:36
Examples of character classes
Which regex will match the letters p, m, or z?
Solution 1:
[pmz]
Solution 2:
[zmp]
Solution 3:
[mzp]
All the preceding three regular expressions will behave in exactly the same manner because the order of the characters inside the character class does not matter.
Which regex will match English language vowels a, e, i, o, and u?
[aeiou]
Which regex will match the field extensions .mp3 or .mp3?
\.mp[34]
Which regex will match the letters @, #, or =?
[@#=]
推薦閱讀
- 演進式架構(原書第2版)
- Learning NServiceBus(Second Edition)
- Drupal 8 Blueprints
- 軟件項目管理(第2版)
- .NET 4.0面向對象編程漫談:基礎篇
- Java Web應用開發技術與案例教程(第2版)
- Hands-On RESTful Web Services with Go
- Python 3破冰人工智能:從入門到實戰
- R大數據分析實用指南
- Mastering Xamarin.Forms(Second Edition)
- Oracle實用教程
- 深度學習程序設計實戰
- Python Penetration Testing Essentials
- 精益軟件開發管理之道
- Python深度學習(第2版)