Debug JavaScript Regular Expressions easily with RegViz

Posted April 30th, 2015 in Web Development. Tagged: , , .

As a JavaScript coder one of the constant things you have to deal with are Regular Expressions. These cryptic string combinations are used for pattern matching and search and replace functions on text. Though they are quite widely used in programming owing to the compactness they offer to string parsing, their debugging complexity can pose challenges.

Any programmer can vouch for the fact that debugging regular expressions often proves to be quite time taking and tedious. Creating the perfect regular expressions that are short, achieve their purpose and are easy to debug is not everyone’s cup of tea. Thus, there are quite a few tools available in the market, which are dedicated to the sole purpose of creating and debugging regular expressions. One such simple and great tool is RegViz.

regviz

RegViz

RegViz is a proficient online tool for debugging JavaScript regular expressions. It gives the entire process a visual structure. By giving identical characters in the source and target string background colors, it makes identifying matching patterns quick and easy. Regular expressions tend to have a complex syntax and hence often seem to be a cryptic jumble of characters. However, with RegViz, you’ll come to find that there’s no rocket science behind them and they’re actually quite easy to deal with.

Normally when you use regular expressions to perform any string matching, identical patterns are highlighted but they do not have coloring characteristics. RegViz works on the color highlighting principle of IDEs to facilitate instant identification of matching patterns. It eliminates the drawbacks of regular expression debugging through simple visual enrichment. It improves the readability of regular expressions and makes their testing environment interactive. With simple marking symbols and the option to choose between matching mode modifiers, it gives regular expression debugging a new dimension!

How it Works

If you regularly work with JavaScript regular expressions, you’ll find this tool extremely handy and easy to work with.
Two text sections act as placeholders for the regular expression and target text respectively and matching mode modifiers are listed in a drop-down at the side of the first text section. You can clear the dummy text by clicking on the “clear” button placed on the top of the each text section or by selecting “clear all” from the drop-down which appears on clicking on a button on the top left corner of the screen; then type in the regular expression and target text. An important thing to remember while typing the regular expression is to enclose each word within a pair of brackets and place the word separator “ | “ after each word, otherwise the test will not work. Then type in the target text within which you want to search and click on the apply button. If there are any matches, they will be highlighted.

You can also insert specific word tests by clicking on a word in the target text and then clicking on the “add test” button. If it is matched, it will be highlighted in green color, else pink color.

regviz1

Additional Features

In addition to the basic features, RegViz contains a collapsible right side panel displaying characters you can use to refine your search. Plus, helpful tooltips are given to explain things where required.
Also, a button on the top left corner when clicked gives advanced options including “load example” (to load examples for reference), “export and share” (to provide a link for sharing your search) and “clear all” (to simultaneously clear the text within both text boxes).

The Positives

There are many benefits of this intuitive tool. There is no sign-up or registration required so you can directly get down to business. It makes JavaScript regular expression debugging quite easy and quick. Color highlights really do help in focusing the attention on matched patterns in large texts.
All rules applied for pattern matching are the same as used in JavaScript regular expressions, for example, $ at line beginning and end, \w for alphanumeric characters etc. so it is quite handy for experienced users.
The tool supports dedicated word tests to provide a deeper level of pattern matching.
It’s simple and focused on its purpose. There aren’t many distractions on the website.
The biggest advantage of this tool is obvious. It’s totally free! Other regular expression tools available in the market have a price attached to them, however, RegViz, with all its utility, is offered to you at no cost!

The Negatives

RegViz derives its power from its simplicity, but the same simplicity is also its weakness. The tool is too simple, both in look and flexibility. It would be fitting to say that the tool does not have any visual appeal, the first reaction that comes on visiting its website is – is that it?

It can perform regular expression debugging only for Javascript, hence users of other languages might not find it useful. This makes it a less preferred choice as compared to other tools that offer the functionality for a wider range of languages.
Plus, there is a learning curve attached to it. First time users might find it a bit inconvenient since simply typing a regular expression and trying to find its match won’t do. You’ll need to learn it through the given examples and through some trials. However, once you get the hang of it, it’ll all be very smooth.
Though the tool is free, once you compare it with other similar tools, paying a little for a superior tool might seem like a better idea.

  • Debug JavaScript regular expressions easily with @regviz regviz.org/ via @supermonitoring

    Tweet this

To Sum it up

Overall, RegViz is good, but might not be good enough for many. It’s free, but makes you feel that it’s better to use a paid tool.
It would however prove to be a good choice for experts with JavaScript regular expressions who just need a simple tool that can help them with their small debugging needs.
Try it out and take your decision!

Comments are closed.

  • Follow us

  • Browse Categories



  • Super Monitoring

    Superhero-powered monitoring
    of website or web application
    availability & performance


    Try it out for free

    or learn more about website monitoring
  • Superhero-powered monitoring
    of website or web application
    availability & performance
    Super Monitoring
    or learn more about
    website monitoring