Contents
egrep - Extended Regular Expressions
Purpose of Document
This page defines how to specify patterns for some of my
search engines.
Summary
An item is selected if there is a line in it that contains a substring
that matches the pattern. The search is carried out by
a PHP function
and that uses the POSIX campatible syntax.
This is very close to the traditional UNIX egrep form.
expression(RE).
Example Patterns
Formal Definition
- Item::=@Line.
Each Item is essentially a set of Lines -- because the order is not
important to the search.
- Line::=#char.
A given line either matches or does not match a pattern... the set of
matching Lines is written M:
M:: pattern->@Line. The lines that match a given pattern
An item is selected by a pattern, if any of its lines matches the pattern:
- For Item I, pattern p, selected(I,p)::= for some L:I(L in M(p) ).
Typically M(p) is any string that
contains a string that matches P:pattern where pattern
is defined by
- pattern::= See http://csci.csusb.edu/dick/samples/regular_expressions.html
Lexemes
- char::=the set of ASCII characters.
- empty::@#char= {""}.
Glossary
- egrep::UNIX_command=Extended Global Regular Expression Print.
- RE::="Regular Expression(s)". -- an expression constructed out of sequences+selectios+iterations.
. . . . . . . . . ( end of section Lookup) <<Contents | End>>
End