Regular Expressions

I would like to know what you use for a Regular Expression tool?  I'm not asking about an editor, but some type of "expression test tool."  I can google for such app, and read;

Yet allow me to ask; is there a better tool, or the best tool?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

peprConnect With a Mentor Commented:
It depends. If you use Eclipse as your Python IDE (e.g., then using QuickREx may be the good choice. If you do not use Eclipse, then it can be a complication for you.

It also depends on what you mean by the expression test tool. For testing a single expression with several sentences, you can use a separate Python script that simply prints the result. If you want to have the collection of tests that check whether the development of the regular expression patterns did not break the previous functionality, then the QuickREx will not help you that much.

You cannot build a regular expression if you do not understand what it really does (or estimate what it should do, in advance). The trial/failure approach would take too much time. I personally would choose a separate, simple Python script or the unittest approach for more extensive testing.
user_nConnect With a Mentor Commented:
Regular expresions are diferent for diferent programing languages
chimaAuthor Commented:
user_n, really! now that's a pain.  Okay, for Python then.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Regular expressions are the way of expressing programs that accept the tested strings. They are a kind of programs where the code (the pattern string) is compiled into the form of so called automaton. This way, one can think also of regular languages See the Noam Chomski hierarchy and the basics of formal grammars (

From that perspective, it is difficult to think about a general tool that would test your regular expression.

However, you can use the approach used for testing programs. Simply said, you can create the set of strings that will be used for testing of your regular expression. The testing function will produce the boolean result that says whether the regular expression behaves the expected way.

When the approach is used for testing the functionality of fragments of bigger code (of the functions, procedures), it is called unit testing ( When you define the wanted behaviour in the form of tests first, and only then you start to implement the solution, then the approach is called test-driven development (

To summarize, you may want to use the unit test framework that is available in Python as the standard module (

There is the chapter in "Dive Into Python 3" explicitly focused to creating the regular expressions (, and a separate chapter is devoted to unit testing -- shown on testing the regular expressions built in the earlier chapter ( The book itself is nicely written, not using big words, explaining what you need to know.
ozoConnect With a Mentor Commented:
Regular expressions are the way of expressing programs that accept the tested strings
Not really, regular expressions express the set of strings the set of strings to be accepted, but say nothing about the program that accepts them.
There can be many different algorithms for accepting the set of strings specified by a regular expression, and many different programs implementing those algorithms.
@ozo: There is the data/code duality when programming. The strings expressed via regular expressions can only be accepted by some program that implements the detection, right? The implementations may differ, but should not we start from the basics? And the efficient implementation is based on a final automaton.
chimaAuthor Commented:
pepr and ozo, while I appreciate your comments, and some good knowledge became of your comments, I feel that we got off the question.  I was/am in search of other Regular Expression tools like QuickREx, see initial links given.  My question is; are there other tools which are better than QuickREx?  Or at least one?
i did not know that Regular Expressions were not a "standard."  User_n pointed out that there are ; "Regular expresions are diferent for diferent programing languages."
I googled to learn whether QuickREx could work with Python and it can.
The purpose of this question, is to learn whether I should spend the time to study QuickREx, when in fact there is a better tool than QuickREx.
chimaAuthor Commented:
thanks for the help.
All Courses

From novice to tech pro — start learning today.