Regular Expressions with BRIEF Emulation (Windows CE 5.0)
The following table shows BRIEF regular expression emulation.
Regular expression | Description |
---|---|
.? | (Question mark.) Any single character. |
[ ] | Any character contained in the brackets, or any of an ASCII range of characters separated by a hyphen (-).
For example, b[aeiou]d matches bad, bed, bid, bod, and bud, and r[eo]+d matches red, rod, reed, and rood, but not reod or roed. x[0-9] matches x0, x1, x2, and so on. If the first character in the brackets is a tilde (~), the regular expression matches any characters except those in the brackets. |
% | The beginning of a line. |
$ | The end of a line. |
{ } | Indicates a tagged expression to retain for replacement purposes.
If the expression in the Find What text box is \(lpsz\)BigPointer, and the expression in the Replace With box is \1NewPointer, all selected occurrences of lpszBigPointer are replaced with lpszNewPointer. Each occurrence of a tagged expression is numbered according to its order in the Find What text box, and its replacement expression is \n, where 0 corresponds to the first tagged expression, 1 to the second, and so on. You can have up to 10 tagged expressions. |
~ | No match if the following character or characters occur.
For example, b\~a+d matches bbd, bcd, bdd, and so on, but not bad. You can use this expression to prefix a group of characters you want to exclude, which is useful for excluding matches of particular words. For example, star\~\(let\) matches "star" in "starfish" and "restart" but not in "starlet." |
{c|c} | Any one of the characters separated by the alternation symbol (|). For example, {j|u}+fruit finds jfruit, jjfruit, ufruit, ujfruit, uufruit, and so on. |
@ | None or more of the preceding characters or expressions. For example, ba@c matches bc, bac, baac, baaac. |
+ | At least one or more of the preceding characters or expressions. For example, ba+c matches bac, baac, baaac, but not bc. |
[ ] | Any sequence of characters between the brackets. For example, [ju]+fruit finds jufruit, jujufruit, jujujufruit, and so on. Note that it will not find jfruit, ufruit, or ujfruit, because the sequence ju is not in any of those strings. |
[~] | Any character except those following the tilde character (~) in the brackets, or any of an ASCII range of characters separated by a hyphen (-).
For example, x[~0-9] matches xa, xb, xc, and so on, but not x0, x1, x2. |
[a – zA – Z0 – 9] | Any single alphanumeric character. |
[\x09\]+ | Any white-space character |
[a – zA – Z] | Any single alphabetic character. |
[0 – 9] | Any decimal digit |
{[0 – 9]+.[0 – 9]@}|{[0 – 9]@.[0 – 9]+}|{[0 – 9]+} | Any unsigned number.
For example, {[0-9]+.[0-9]@}|{[0-9]@.[0-9]+}|{[0-9]+}should match 123, .45, and 123.45. |
[0 – 9]+ | Any unsigned decimal integer. |
[0 – 9a – fA – F]+ | Any hexadecimal number. |
[a – zA – Z_$][a – zA – Z0 – 9_$]@ | Any C/C++ identifier. |
[a – zA – Z]+ | Any alphabetic string. |
"[~"]@" | Any quoted string. |
\ | Removes the pattern match characteristic in the Find What text box from the special characters listed above.
For example, 100$ matches 100 at the end of a line, but 100\$ matches the character string 100$ anywhere on a line. |
Send Feedback on this topic to the authors