- 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.
推薦閱讀
- Oracle 11g從入門到精通(第2版) (軟件開(kāi)發(fā)視頻大講堂)
- Python語(yǔ)言程序設(shè)計(jì)
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- Mastering Apache Spark 2.x(Second Edition)
- SQL Server從入門到精通(第3版)
- 區(qū)塊鏈技術(shù)進(jìn)階與實(shí)戰(zhàn)(第2版)
- Everyday Data Structures
- 從Power BI到Analysis Services:企業(yè)級(jí)數(shù)據(jù)分析實(shí)戰(zhàn)
- 測(cè)試架構(gòu)師修煉之道:從測(cè)試工程師到測(cè)試架構(gòu)師
- 安卓工程師教你玩轉(zhuǎn)Android
- 你必須知道的.NET(第2版)
- HTML并不簡(jiǎn)單:Web前端開(kāi)發(fā)精進(jìn)秘籍
- C++標(biāo)準(zhǔn)庫(kù)(第2版)
- Building Microservices with .NET Core 2.0(Second Edition)
- Microsoft Azure Security