[Gambas-devel] pcre component 0.0.3 - working
Rob
sourceforge-raindog2 at ...19...
Thu Sep 30 22:44:50 CEST 2004
Here is gb.pcre 0.0.3. It seems to work fully now, though I
would appreciate suggestions on more methods/properties.
The class is called Regex. You initialize it like this:
dim re as Regex
re = new Regex("string to match", "regular expression")
It has these members:
integer property Offset - offset of the match if successful.
string property Match - that part of the string that matched the
whole expression.
integer property SubMatchCount - number of submatches available.
string method SubMatch - takes index of the desired submatch and
returns the matching substring.
A submatch is part of a match you put in parenthesis, like this:
re = new Regex("quick brown fox", "(b.+?)\s(\S+)")
Submatch 1 is "brown", submatch 2 is "fox".
It's still available from http://www.kudla.org/rpm/ but here is
the tarball. also included is an example gambas project.
That error dialog I was getting earlier went away... I don't know
why, but I did reinstall gambas between then and now.
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcre-0.0.3.tar.gz
Type: application/x-tgz
Size: 7299 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20040930/1b9437e5/attachment.bin>
More information about the Devel
mailing list