Previous
|
Up
|
Next
|
Grep and Multifile Searching in Epsilon 10 |
New Features in Epsilon 11 |
TeX and LaTeX in Epsilon 10 |
Epsilon User's Manual and Reference >
Changes from Older Versions >
Enhanced Features in Epsilon 10 >
Regular Expression Enhancements in Epsilon 10
Previous versions of Epsilon let you write <Tab> or
<#9> to represent special characters, or use the syntax
<#9|Space|;> to match one of a set of characters.
Epsilon now recognizes a few additional names, listed below, that
represent predefined sets of characters. Some use Epsilon's current
syntax table, which an EEL program may modify, by way of the
isalpha( ) primitive. Typically this includes accented
characters like ê or å.
| Class | Meaning |
| <digit> | A digit, 0 to 9. |
| <alpha> | A letter, according to isalpha( ). |
| <alphanum> | Either of the above. |
| <word> | All of the above, plus the _ character. |
| <hspace> | The same as <Space|Tab> . |
| <wspace> | The same as <Space|Tab|Newline> . |
| <any> | Any character including <Newline> . |
You may mix the above class names with other <> character
representations. For example, <^digit|a-f> matches
any character except of one these: 0123456789abcdef .
Epsilon also recognizes some new assertions. Like the assertions
^ and $ , these don't match any specific characters,
but a potential match will be rejected if the assertion is not true at
the appropriate point in the match.
| Assertion | Meaning |
| ^ | At the start of a line. |
| $ | At the end of a line. |
| <bob> or <bof> | At the start of the buffer. |
| <eob> or <eof> | At the end of the buffer. |
For example, searching for <bob>sometext<eob> won't
succeed unless the buffer contains only the eight character string
sometext .
You can now create new assertions from character classes specified
with the angle bracket syntax by adding [ , ] or / at the
start of the pattern.
| Assertion | Meaning |
| <[class> | The next character matches class, the previous one does not. |
| <]class> | The previous character matches class, the next one does not. |
| </class> | Either of the above. |
The class in the above syntax is a | -separated list of one or
more single characters, character names like Space or
Tab , character numbers like #32 or #9 , ranges of any
of these, or character class names like Word or Digit .
For example, </word> matches at a word boundary, and
<]word> matches at the end of a word. The pattern
<]0-9|a-f> matches at the end of a run of
hexadecimal digits. And the pattern
(cat|[0-9])</digit>(dog|[0-9]) matches cat3 or
4dog , but not catdog or 42 .
Previous
|
Up
|
Next
|
Grep and Multifile Searching in Epsilon 10 |
New Features in Epsilon 11 |
TeX and LaTeX in Epsilon 10 |
Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.
|