gambas-source-code/gb.pcre/src
Benoît Minisini 9b46a269c7 [DEVELOPMENT ENVIRONMENT]
* NEW: Adds a popup menu to the console window.

[WIKI CGI SCRIPT]
* BUG: Display a message when accessing a symbol page that does not exist 
  in the current version.

[EXAMPLES]
* NEW: New Barcode example made by Charles Guerin and modified by me.

[INTERPRETER]
* NEW: New API for returning the fully-qualified domain name.
* BUG: Fix a bug in DateAdd() that made this function corrupt the next 
  date to string conversion, which then lead to other bad weird things.

[GB.DRAW]
* BUG: Fix Draw.Circle center that was shifted one pixel to the top left.

[GB.GTK]
* BUG: Window.Reparent() now works correctly when embedding or unembedding 
  a top-level window.
  
[GB.NET.SMTP]
* NEW: Do not use MIME parts when it is useless.
* BUG: Try to use the fully-qualified domain name when sending the EHLO 
  command to the SMTP server. That actually works only if the system domain
  name has been set to the DNS domain name.

[GB.PCRE]
* BUG: Fix crashes due to bad uses of interpreter API.

[GB.QT]
* BUG: Fix the drawing of the frame of cached DrawingArea controls.


git-svn-id: svn://localhost/gambas/trunk@1404 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2008-06-11 10:44:50 +00:00
..
gb.pcre.component * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas 2007-12-30 16:41:49 +00:00
main.c * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas 2007-12-30 16:41:49 +00:00
main.h * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas 2007-12-30 16:41:49 +00:00
Makefile.am * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas 2007-12-30 16:41:49 +00:00
README * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas 2007-12-30 16:41:49 +00:00
regexp.c [DEVELOPMENT ENVIRONMENT] 2008-06-11 10:44:50 +00:00
regexp.h * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas 2007-12-30 16:41:49 +00:00

gb.pcre

Gambas PCRE Component

version 0.04 - 4 October 2004

Copyright 2004 Rob Kudla and Benoit Minisini

This component is licensed under the same terms as Gambas itself,
namely those of the GNU General Public License.

This component implements perl-style regular expressions using the
PCRE (Perl-Compatible Regular Expressions) library.  It contains one
class, Regex, as described below.  Currently it's only useful for
matching, and replacing will have to be done in Gambas code... I hope
to provide example Match() and MatchReplace() functions soon.

Synopsis:

dim re as Regex
re = new Regex("stringtosearch","regularexpression")

Regex.Offset: The offset within the string where a match occurred.
Regex.Match: The text that matched the pattern.

If you put parentheses around part of your pattern, and the whole
pattern matches, the parts in parens become submatches.

Regex.SubMatchCount: The number of submatches found.
Regex.SubMatch(i as integer): The text of submatch i.
Regex.SubMatchOffset(i as integer): The offset of submatch i.

Example:

dim i as integer
dim re as Regex
re = new Regex("the quick brown fox","quick(.+)fox")
if re.Offset >= 0 then
   print re.Match
   for i = 1 to re.SubMatchCount
       print re.SubMatch(i)
   next
endif

This should generate the following output:

quick brown fox
 brown 

To compile this component, you must have a Gambas 0.99 source tree
available and place this tarball's contents (the whole pcre directory)
under src/lib in the gambas source tree.  Then you must modify a
number of files in the gambas source tree and rebuild according to the
instructions in:

http://www.binara.com/gambas-wiki/bin/view/Gambas/HowToProgramComponentsQuick 

I'll try to make a Mandrake package of this and announce it on the
gambas-user@sourceforge.net list.

Rob Kudla
pcre-component@kudla.org