- Java 9 Regular Expressions
- Anubhava Srivastava
- 110字
- 2021-07-02 18:58:36
Examples of character range
The following is a regex that matches any uppercase or lowercase alphabet in the English language:
[a-zA-Z]
The a-z pattern is for the lowercase character range and A-Z is for the uppercase character range.
The following regex matches any alphanumeric characters:
[a-zA-Z0-9]
Alpha numeric characters consist of any English alphabets and digits.
The following regex matches any hexadecimal character:
[a-fA-F0-9]
We know that hexadecimal characters consist of digits, 0 to 9, and letters, A to F (ignore casing). The preceding regex pattern shows a character class that includes these two character ranges. We use a-f and A-F ranges to make it match uppercase or lowercase letters.
推薦閱讀
- Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
- 深度實踐OpenStack:基于Python的OpenStack組件開發
- Learning Cython Programming(Second Edition)
- JavaScript 從入門到項目實踐(超值版)
- Learn to Create WordPress Themes by Building 5 Projects
- PHP+MySQL網站開發技術項目式教程(第2版)
- 跟老齊學Python:輕松入門
- Windows Server 2012 Unified Remote Access Planning and Deployment
- Unity Game Development Scripting
- Visual C#.NET程序設計
- Unreal Engine 4 Shaders and Effects Cookbook
- BIM概論及Revit精講
- Scratch3.0趣味編程動手玩:比賽訓練營
- Building Wireless Sensor Networks Using Arduino
- Python自然語言理解:自然語言理解系統開發與應用實戰