Regular expression or regex is powerful but light way of extracting certain patterns out of large text. Since it does not consume much computing power, many people use it in various domains including web development, data analytics, data science, and more. Being light means it is computer-friendly. In other word, it is not straightforward to human beings to comprehend.
So, it is essential that you need to run several tests to check if your regex captures right texts. To test it, you don’t have to download any program to your PC. Thanks to great people out there, you can use an online regex testing tool for free. I personally used some of them, and I really loved the quality of the testers although they are free. My big kudos to them!
Let’s find out what awesome regex testers exist on the Internet. In each regex tester, I will list notable features that I liked about. The order of the list does not reflect any ranking.
I used Regular Expression 101 many times. If you search regex tester on Google, you will also see this at the top of the result. My experience with this tester has been great that it is worth the title “101” of regular expression. It has a simple, but complete UI design.
Reference is a very convenient feature for a regex tester to have. Reference here means if you can check regular expressions rules without having to leave the website. With reference, you can quickly search regex. For example, if you want to find a regex to capture any digit, in a reference section, you will type “digit” to find a list of regex that is digit-related rules. Having a reference means that it can be a great place to study regex.
Having said that, Regular Expression 101 provides this convenient feature. It has a search box where you can type things like “digit”, “word”, “space”, and so on. Then, its reference will find you the most relevant regex. The reference section and search box are on the same page where you can test your regex. So, you can test and search regex at the same time, which is a great UX design.
Regular Expression 101 also has an explanation section on the testing page. So, you can see an explanation as you type your regex in real-time. Reference and Explanation on the same page will give you a convenience to check and debug your regex.
We all hate quiz. But, if you are really into learning,
You can type your answer to the input box, and click “SUBMIT”. Then it will show you the test result right away. You have to submit the right answer to move onto the next stage just like a game. When you submit and your answer is correct, the result will tell you the shortest possible length of the regex to capture the problem.
The image on the right does not show you the full list. It has a total of 28 questions. You will want to definitely check the quiz section if you are currently learning regex.
You have to log in to use the quiz menu.
RegExr has also a good User Interface and a wide range of functionalities. In terms of features, it is as great as Regex101. But, it has less number of supporting languages.
In addition to Reference, they have a separate section called, “Cheatsheet”. There, you can find the most frequently used regular expressions. So, if you want to warm up
RegExr has an Explain function that tells you about your regex. It placed the explanation section at the bottom of the page so that you can simply see at the bottom to check how your regex works. Regex101 places the explanation menu at the right bottom corner. In that regard, it can be easier to browse the explanations of RegExr due to the UI design. But, personally, both are just fine to me.
You can save your regular expressions using your account. As you compile many more regex, you can search a specific regex using their search input. With this function, you don’t have to manage a separate text file to store all of your regex. Similarly, Regular Expression 101 has a history menu where you can track your previous regular expressions tested on the website.
Compared to the two testers, this online regex tester provides fewer functionalities. You will notice a big difference as you go into their website. RegEx Testing also has a Cheat Sheet. The tester has Top Regular Expressions, but I really don’t understand what it is. From their UI design, I can tell that you would be able to save your regex easily since it is placed very visibly on the right menu.
This regex tester has a better UI design than Free Formatter. However, it still provides limited features compared to Regex101 and RegExr. As the title name explains, you can use this tester to examine your .NET regular expressions. It has a separate reference section and you should leave the testing page to find some regex information. If you want to test your regex in .NET environment, it can be a good fit for your purpose.
This post introduced the five free online regex testers. If you are trying to find a good regex tester, then I believe you can better live with Regex101 or RegExr. If you are specifically looking for .NET regex tester, try .NET Regex Tester. Happy coding everyone!