kiki-0.5.6.orig/ 0000755 0001750 0001750 00000000000 10276345074 012072 5 ustar doko doko kiki-0.5.6.orig/__init__.py 0000644 0001750 0001750 00000000000 10035311504 014151 0 ustar doko doko kiki-0.5.6.orig/docs/ 0000755 0001750 0001750 00000000000 10035311502 013000 5 ustar doko doko kiki-0.5.6.orig/docs/about.html 0000644 0001750 0001750 00000010214 10035311454 015004 0 ustar doko doko
Kiki |
Kiki is a free environment for regular expression testing (ferret).
|
Program info |
Version: %(version)s Program directory: %(kikidir)s Data directory: %(datadir)s Python version: %(pythonversion)s wxPython version: %(wxpythonversion)s Spe status: %(spe)s |
Contact info |
Web: %(website)s e-mail/msn: %(mail)s icq: %(icq)s |
Credits |
Kiki is built using a number of tools besides the extensive libraries of Python and wxPython:
|
Licence |
This program is © 2003, 2004 by Project 5 It is licenced under the GNU General Public Licence (GPL) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
Intro | ||
Kiki is a free environment for regular expression testing (ferret).
It allows you to write regexes and test them against your sample
text, providing extensive output about the results. It is useful
for several purposes:
| ||
Working with Kiki | ||
Enter the regex in the combo box and hit Evaluate to run it against
the text in the Sample text tab. The results appear in the
Matches tab. You can use the list in the Help tab to view
the built-in documentation about regular expressions. This documentation
comes from the Python help files.
Kiki automatically stores its settings and the last used sample text/regex in between sessions. During a session, all regexes which have been evaluated and have returned matches, are also stored in the combo box where the regex is entered, so you may experiment with e.g. adapted versions without losing a more primitive regex that already kinda works. | ||
Options | ||
| ||
Understanding the output | ||
Kiki's output is quite extensive and provides color-coded information on the results
of the match. Let's assume you're trying to match the regex
fer(re)*t against
the sample text
Kiki the ferret - as nifty as ferrets get .
The results of a Find all evaluation by default looks something like this:
Each match is prepended by a small, underlined number: this is the index of the corresponding match object in the list of match objects found in the sample text. In the example above, there are two match objects, with indexes 0 and 1. Within each match, colored parentheses show where a match group starts and ends. Group ()0 represents the entire match. In this example we have also created an extra group because of the use of (re)* ". This is made visible by the green parentheses bearing the
index 1:
()1.
Pay attention to an interesting property of these groups: some of them might not contribute to the match and are then skipped in the output (in the match object, these groups start and end at position -1). An example: let's find all sentences talking about expecting the Spanish Inquisition in the text below:
Chapman: I didn't expect a kind of Spanish Inquisition.
For this purpose, we can use e.g. the following regex: ([a-zA-Z']+\s)+?expect(.*?)(the )*Spanish Inquisition(!|.)
The result is:
The interesting part is what's going on in the match with index 0: between the group with index 2 and the one with index 4, the group with index 3 has disappeared. This group matches an optional the which
is not present in this case. In other words, the group exists, but does not contribute
to the match and is therefore not displayed.
|