- 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 =?
[@#=]
推薦閱讀
- Boost.Asio C++ Network Programming(Second Edition)
- 自己動手寫Java虛擬機
- 精通搜索分析
- 碼上行動:零基礎學會Python編程(ChatGPT版)
- Java Web及其框架技術
- OpenCV for Secret Agents
- R的極客理想:工具篇
- Linux:Embedded Development
- 精通MATLAB(第3版)
- SQL基礎教程(第2版)
- Microsoft Azure Storage Essentials
- Instant Lucene.NET
- Webpack實戰:入門、進階與調優(第2版)
- Practical Predictive Analytics
- IBM RUP參考與認證指南