TParseText is a useful text parsing and pattern matching component.
You define the properties 'text' and 'pattern', and with the methods
'findFirst', 'findNext' and 'findPrevious' you can search the text
for an occurrence of the given pattern that can include wildcards.

The component TParseText was devlopped with delphi3.



description of the pattern syntax
----------------------------------
(note: the items between '{' and '}' are optional, the
       brackets itselves are not required!)

You can type ...

-> any character like 'a' or 'A'
-> '?' for any single character
-> '?[{!,}listOfChars]' for a single character, defined
   by the set listOfChars

    - '!' is a NOT-operator (if implemented, it has to be
      placed at the first position after '['), it 'inverts'
      the set of listOfChars (that means the set of all
      possible (256) characters minus the set of listOfChars
    - listOfChars defines the set of characters in which the
      character must be

   examples: '?[!,#10,#13]' (single character not in [chr(10),chr(13)])
             '?[a-z,0-9]    (single character in ['a'..'z','0'..'9'])

-> '*' for multiple (not defined) characters of any type
-> '*[{$x,}{!,}listOfChars]' for multiple characters, defined
   by the set listOfChars

    - '$x' is a additional definition to define how many characters
      instead of multiple, 'x' is the number of characters (if
      implemented, it has to be placed at the first position after '[')
    - '!' is a NOT-operator (the same as above, if implemented, it has
      to be placed at the first or second position after '[')
    - listOfChars defines the set of characters in which the
      character must be (the same as above)

   examples: '*[$2,!,a-z]'    (two characters not in ['a'..'z'])
             '*[#10,#13,a-z]' (multiple characters in [#10,#13,'a'..'z'])

-> the combination of all listed above



examples
--------

  pattern:                 matching text:                 not matching text:
  --------                 --------------                 ------------------

  'a*[$2,!,0-9]'           'abc', 'a=b'                   'a6g', 'bbc', 'a08'
  '*9 $*'                  'is 9 $ per'                   'is 10 $ per'
  '199?[7-9]'              '1997', '1998', '1999'         '1990', '1996'



installation
------------

To install TParseText copy all files to a new directory, copy the
file UParseText.dcr to the directory ..\borland\delphi3\lib.
Use 'install component' in the menu 'component' and choose UParseText.dcu

The file uparsetext.txt includes a part of the source which might help you.
For questions and suggestions:
my email address is:  joseph.beer.hallwag@hallweb.ch