CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions:
YAPE-Regex-Explain-1.01

 



japhy
Enthusiast / Moderator

Feb 5, 2001, 11:31 PM

Post #1 of 2 (3184 views)
YAPE-Regex-Explain-1.01 Can't Post

If you're having trouble understanding a regular expression, and the documentation doesn't seem to help you, YAPE::Regex::Explain is probably the tool you've been searching for!

Go to http://www.pobox.com/~japhy/YAPE/ for more information on this module. In a nutshell, you give it a regex, and it tells you, in a verbose, node-by-node outline, what the regex does.

Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author


yapp
User

Mar 14, 2002, 12:06 PM

Post #2 of 2 (3126 views)
Re: [japhy] YAPE-Regex-Explain-1.01 [In reply to] Can't Post

Great tool! Smile Jasmine notified me about this module somewhere in the beginners forum.

I've been trying to make a CGI interface for this module. Hope that notifying at the page bottom that I use your module is good enough...

However, you might want to the following things:

A. bad explain - Try it yourself:
- goto [url=http://www.codingdomain.com/cgi-bin/frameset.cgi?url=perl/explainregexp.html]my YAPE::Regex::Explain interface
- enter "\Q at $0 line \E\d+\." in the textarea. (without the quotes)

The explainregexp.cgi uses that regexp to remove "at <file> line <x>" strings from an error message. My scripts validates the regex in a eval {m//} statement first, before your module is used.


B. Inheritance
Also, I've been trying to use inheritance at your explain module (to add a explainHTML() method). I wanted the result to be displayed in a more HTML way. The only sad thing is the fact that the $format variable is initialized from the explain() method. So when I copy-paste-adjust the code of the explain() method to my module, I can't get the explain() methods in the element classes working, since they require $format is initialized. Maybe adding a setFormat method is a nice feature.

All other things seam to work correctly. This is still a great job. I guess this will be useful to a lot of developers.

Yet Another Perl Programmer

_________________________________
~~> [url=http://www.codingdomain.com]www.codingdomain.com <~~
More then 3500 X-Forum [url=http://www.codingdomain.com/cgi-perl/downloads/x-forum]Downloads! Cool

(This post was edited by yapp on Mar 14, 2002, 12:16 PM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives