Predefined Character Classes
The Pattern
API contains a number of useful predefined character classes, which offer convenient shorthands for commonly used regular expressions:
. |
Any character (may or may not match line terminators) |
\d |
A digit: [0-9]
|
\D |
A non-digit: [^0-9]
|
\s |
A whitespace character: [ \t\n\x0B\f\r]
|
\S |
A non-whitespace character: [^\s]
|
\w |
A word character: [a-zA-Z_0-9]
|
\W |
A non-word character: [^\w]
|
https://docs.oracle.com/javase/tutorial/essential/regex/pre_char_classes.html
相关推荐
- 预定义字符集(Predefined character classes):如"\d"匹配任何数字,"\w"匹配任何字母数字字符等。 - 正则表达式修饰符(Modifiers):指定匹配模式,如忽略大小写(i)、全局搜索(g)等。 由于这部分内容是...
8. **预定义字符类(Predefined Character Classes)**:`\d`(数字)、`\D`(非数字)、`\w`(字母数字下划线)、`\W`(非字母数字下划线)、`\s`(空白字符)、`\S`(非空白字符)。 9. **转义字符(Escape ...
9. **预定义字符类(Predefined Character Classes)**:`\d` 对应 `[0-9]`,`\D` 对应 `[^0-9]`,`\w` 对应 `[a-zA-Z0-9_]`,`\W` 对应 `[^a-zA-Z0-9_]`。 10. **选择与或(Alternation)**:`|` 表示或操作,如 `...
6. **预定义字符集(Predefined Character Classes)**:如`\d`(等同于`[0-9]`)、`\D`(非数字)、`\s`(空白字符)、`\S`(非空白字符)、`\w`(字母数字字符)和`\W`(非字母数字字符)。 通过这些基本元素的...
6. **预定义字符类(Predefined Character Classes)**:预定义的字符类提供了一些常见的字符集合,如`\d`匹配数字(等同于`[0-9]`),`\D`匹配非数字,`\s`匹配空白字符,`\S`匹配非空白字符,`\w`匹配字母、数字或...
7. **预定义字符类(Predefined Character Classes)**:如\d表示数字,\w表示字母数字,\s表示空白字符,这些特殊字符可以简化正则表达式编写。 8. **量词(Quantifiers)**:如*、+、?和{n,m}用于指定某个模式...
4. **预定义字符集(Predefined Character Classes)**: - **`\p{Prop}`** 和 **`\P{Prop}`**:匹配具有特定Unicode属性的字符(如`\p{Uppercase}`)和不具有该属性的字符(如`\P{Uppercase}`)。 5. **量词修饰...
2. **预定义字符类(Predefined Character Classes)**:例如`\w`等同于[a-zA-Z0-9_],表示单词字符;`\W`是其反义,非单词字符。 3. **分组与引用(Groups and Backreferences)**:使用`( )`来创建分组,可以捕获...
* Predefined character classes 预定义字符序列 * . Any character (may or may not match line terminators) . 任意字符 (也可能不包括行结束符) * \d A digit: [0-9] \d...
8. **预定义字符类(Predefined character classes)**:`\d`, `\D`, `\w`, `\W`, `\s`, `\S` 等预定义字符类简化了对数字、字母、空白等常见字符的匹配。 9. **转义字符(Escaped characters)**:在正则表达式中...
•Predefined Interfaces and Classes •Context options and parameters •Supported Protocols and Wrappers •Security•Introduction •General considerations •Installed as CGI binary •Installed as an ...
Using Predefined Classes 111 Defining Your Own Classes 122 Static Fields and Methods 132 Method Parameters 138 Object Construction 144 Packages 15 The Class Path 160 Documentation Comments 162 ...
4. **预定义字符类(Predefined Classes)**:如`\d`、`\D`、`\w`、`\W`、`\s`、`\S`等,它们简化了常见字符集的表示。 5. **分组(Grouping)**:使用圆括号`()`将多个字符或子表达式组合成一个组,可以进行重复、...
- 一般规定(General)、字符特征(Character traits)、字符串类(String classes)、类模板basic_string(Class template basic_string)、数值转换(Numeric conversions)、哈希支持(Hash support)、空终止...
STL Function Objects <br/>8.1 The Concept of Function Objects <br/>8.2 Predefined Function Objects <br/>8.3 Supplementary Composing Function Objects <br/>Chapter 9. STL Algorithms...
PEP 3155: Qualified name for classes and functions PEP 412: Key-Sharing Dictionary PEP 362: Function Signature Object PEP 421: Adding sys.implementation SimpleNamespace Using importlib as the ...
FASMARM v1.42 This package is an ARM assembler add-on for FASM. FASMARM currently supports the full range of instructions for 32-bit and 64-bit ARM processors and coprocessors up to and including v8...
implementation comes with an SMTP, IMAP4, and POP3 provider besides the core classes. After installing JavaMail 1.2, install the JavaBeans Activation Framework. Installing JavaMail 1.1.3 To use ...
Keywords have predefined meanings in C and cannot be used as identifiers. - **Examples:** `int`, `float`, `return`, `if`, `for`. ##### Whitespace in C Whitespace characters (spaces, tabs, newlines)...
5.3 Character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4 Preprocessing tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....