1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
*********************** RegExplorer 0.1.6 **********************
RegExplorer is a visual regular expression explorer, it allows for writing
regular expressions and visually see the matches, thus making regular
expression much easier to write and maintain.
RegExplorer is written by Jan Borsodi <jb@ez.no>
Requirements:
Troll Tech's Qt Library (Version 2.0 or higher)
Recommended Qt 2.2.0
Download at ftp://ftp.trolltech.com/qt/source/qt-x11-2.2.0.tar.gz
or follow the links on http://www.trolltech.com
If you want the development documents you will need Doxygen.
Download at http://www.stack.nl/~dimitri/doxygen/download.html
Compiling:
A simple "make" should be sufficient, but if you experience problems
try to download tmake from http://www.troll.no. Install it and do a
"tmake -o Makefile regexplorer.pro" in the src directory and then a "make".
Thanks to:
Wim Delvaux, Kevin Ying, Justin Mason, Markus Fischer
Kent Vander Velden, Jan Prokop, Don Undeen
for tips, bugfixes and general comments
Usage:
Simply write the regular expressions in the upper text field, the matches
are automaticly updated as you write.
RegExplorer can be used in different modes, these are:
Normal - This is the most common mode, matching is done by finding the
first match, you can select which subexpression that can be shown by
selection from the listbox at the right.
Multiple - This mode let's match the regexp as many times as it can,
both the subexpression and match index can be selected from the listbox
on the right. Match index 0 equals to selecting all matches.
Split - This mode is almost Multiple mode inverted, it will split
the text with the regexp all text that doesn't match the regexp
will be selectable. Very nice to use on colon/comma separated lists.
You can also split one line at a time by selecting Match Type/Single Line.
Match index and line number can be selected on the right listboxes.
Match index 0 equals to selecting all matches.
The Functions F1 - F12 can be used to select entries in the upper listbox on
the right and Shift + F1 - F12 to select entries in the lower listbox on
the right.
Supported backslash types are:
Outside bracket:
\w All characters [a-zA-Z]
\W All non characters [^a-zA-Z]
\c All noncapital characters [a-z]
\C All capital characters [A-Z]
\i Alphanumeric characters [a-zA-Z0-9]
\I Identifier(C++ identifiers etc..) [a-zA-Z][a-zA-Z_0-9]
\d Digits [0-9]
\D Non digits [^0-9]
\s White Spaces [ \t\r\n\f]
\S Non white space [^ \t\r\n\f]
\n Newline
\f Form feed
\r Carriage return
\t Tab
\. The . character
\( The ( character
\) The ) character
\\ The \ character \\
Inside bracket:
\w All characters a-zA-Z
\W All non characters ^a-zA-Z
\c All noncapital characters a-z
\C All capital characters A-Z
\i Alphanumeric characters a-zA-Z0-9
\d Digits 0-9
\D Non digits ^0-9
\s White Spaces " \t\r\n\f"
\S Non white space "^ \t\r\n\f"
\n Newline
\f Form feed
\r Carriage return
\t Tab
\. The . character
\( The ( character
\) The ) character
\\ The \ character \\
Instead of typing in text in the multilinedit box you can load a text file by
selecting File/Load Text File.
Colors are configurable from the Edit menu.
This version can convert the regexp to others used in different programming
languages/toolkits, supported conversions are plain text, Lisp, Perl, PHP and Qt.
The converted regexp is available at the bottom of the window and can
be copied to your work.
All options in the menus, window size, splitter positions, regexp, text written,
colors and selections are saved when you quit the program, options and colors
are saved in ~/.regexp/config, regexp in ~/.regexp/regexp, text in
~/.regexp/text and file history in ~/.regexp/history. Options are loaded on startup.
For more information on regular expressions read the man pages regex(7)
or lookup Regular Expressions in the book "Programmming Perl".
|