|
|
||
|
|
StringExpression (~~) |
| s1~~s2~~... or StringExpression[s1, s2, ...] represents a sequence of strings and symbolic string objects si. |
| "string" | a literal string of characters | |
| _ | any single character | |
| __ | any substring of one or more characters | |
| ___ | any substring of zero or more characters | |
| x_, x__, x___ | substrings given the name x | |
| x:pattern | pattern given the name x | |
| pattern.. | pattern repeated one or more times | |
| pattern... | pattern repeated zero or more times | |
| {patt1, patt2, ...} or patt1|patt2|... | a pattern matching at least one of the patti | |
| patt/;cond | a pattern for which cond evaluates to True | |
| pattern?test | a pattern for which test yields True for each character | |
| Whitespace | a sequence of whitespace characters | |
| NumberString | the characters of a number | |
| DatePattern[spec] | the characters of a date | |
| charobj | an object representing a character class (see below) | |
| RegularExpression["regexp"] | substring matching a regular expression | |
| StringExpression[...] | an arbitrary string expression |
| {c1,c2,...} | any of the "ci" | |
| Characters["c1c2..."] | any of the "ci" | |
| CharacterRange["c1","c2"] | any character in the range "c1" to "c2" | |
| DigitCharacter | digit 0-9 | |
| LetterCharacter | letter | |
| WhitespaceCharacter | space, newline, tab or other whitespace character | |
| WordCharacter | letter or digit | |
| Except[p] | any character except ones matching p |
| StartOfString | start of the whole string | |
| EndOfString | end of the whole string | |
| StartOfLine | start of a line | |
| EndOfLine | end of a line | |
| WordBoundary | boundary between word characters and others | |
| Except[WordBoundary] | anywhere except a word boundary |
| Shortest[p] | the shortest consistent match for p | |
| Longest[p] | the longest consistent match for p (default) |
| © 2008 Wolfram Research, Inc. |