[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci Dept] / [R J Botting] / [Samples] / egrep
[Index] [Contents] [Source Text] [About] [Notation] [Copyright] [Comment/Contact] [Search ]
Tue Sep 18 15:25:39 PDT 2007


    egrep - Extended Regular Expressions

      Purpose of Document

      This page defines how to specify patterns for some of my search engines.


      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

    1. Item::=@Line. Each Item is essentially a set of Lines -- because the order is not important to the search.

    2. 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:

    3. 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

    4. pattern::= See http://csci.csusb.edu/dick/samples/regular_expressions.html


    5. char::=the set of ASCII characters.
    6. empty::@#char= {""}.


    7. egrep::UNIX_command=Extended Global Regular Expression Print.

    8. RE::="Regular Expression(s)". -- an expression constructed out of sequences+selectios+iterations.

    . . . . . . . . . ( end of section Lookup) <<Contents | End>>