[lug] REGEX DEVELOPMENT TOOL
Quentin Hartman
qhartman at gmail.com
Tue May 14 13:27:34 MDT 2013
I don't think there's likely to be anything out of the box that will be
terribly useful. Loosely or non-standard text processing like you describe
just doesn't generalize well. Just make sure whatever you build it with has
a robust regex engine. Perl's is probably the best out there, but anything
that is PCRE (or close to PCRE) will be good. For myself, I'd use Ruby.
Their regex engine isn't quite as fast or featureful as Perl's, but I know
the language better so the trade off would be worth it. Python has a good
PCRE lib, but PHPs is terrible (or was, last time I looked), and good ol'
awk (or any other posix or GNU based system) will probably be missing some
features that would make your life easier compared to something more robust.
I have to disagree with the recommendation for TCL though unless you really
know it well already. Their regex engine is a minor extension of the posix
standard, which is pretty limited compared to the others.
This page has a nice comparison of the quirks among the various regex
engines you're likely to find:
http://www.regular-expressions.info/refflavors.html
QH
On Tue, May 14, 2013 at 1:02 PM, Andrew Louder <ajlouder at yahoo.com> wrote:
> You may consider TCL/expect scripts, which supports regular expressions
> with switch/case statements.
> https://www.tcl.tk/man/tcl8.6/TclCmd/switch.htm
>
> Andy
>
> ------------------------------
> *From:* Gordon Golding <gordongoldin at aim.com>
> *To:* lug at lug.boulder.co.us
> *Sent:* Tuesday, May 14, 2013 11:56 AM
> *Subject:* [lug] REGEX DEVELOPMENT TOOL
>
> Looks like I will be developing a lot of regex's.
> Legacy systems send info - client info, transactions, info about
> suppliers for the transaction, etc.. in packed text files.
> Basic structure is known, but there are so many variants, even from one
> client.
> So there needs to be a flexible library of regexs which can be re-used
> and extended.
>
> Are there any tools better than regex? Like a powerful parser tool - like
> the front end of a compiler?
> ( I will be drawn and quartered in the public square for desecrating the
> name of regex...)
>
> After my "correction" by the Spanish Inquisition for asking the above
> question....
> What about the best tool to develop and manage a tree of Regexs?
>
> Like the way a code management system gives you the tree -
> I could see the parents and siblings and easily see differences, so I
> could easily visualize and grab "this from branch A and this from C and
> quickly create my hybrid".
>
> Gordon Golding
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20130514/117e7406/attachment.html>
More information about the LUG
mailing list