Test your regular expression with Graphrex 0.2

Now you can test your regular expression with Graphrex. As well as the unique visualization introduced in the first version, now with version 0.2 Graphrex enables you to run a regex against test text and get visual feedback about matches, capture groups and more.

Testing a regular expression in Graphrex (screenshot)This screenshot shows the new function. Notice the visualization in the Graphrex editor. The corresponding regular expression can be entered and edited (with error highlighting) in the Regex view below the editor. Now on the same view you can enter the text to test the regex against. Run the test with the Run icon run button.

Any text that is matched by the regular expression is annotated with green squiggly underlines when you run the test, and its location is marked in the margin and on the overview ruler on the right. If you have capture groups in your regex, as in the screen shot, you can hover over a match to see what was captured by each group.

If you put the text cursor in one of the match annotations (e.g. by clicking on it) the annotation becomes selected as shown by the green background. Capture groups that have captured text for the selected match will be highlighted, in the both the diagram and the outline view, and the captured text will be shown. In the diagram it appears in the title bar of the capture group box, and in the outline view it shows up in a new Matched text column.

The Regex view remembers the test text you type in. (It is stored with the Eclipse metadata).

Other enhancements in version 0.2

  • Regular expressions containing newlines and certain other characters are now correctly restored when a Graphrex diagram is saved and re-opened.
  • The fields in the Regex view now use a unicode font.
  • The Outline view is improved to be more readable.
  • A bug with Save As was fixed.

About Alan

Alan does development at Croton Research.
This entry posted in Uncategorized. Bookmark the permalink. 

2 Responses to Test your regular expression with Graphrex 0.2

  1. Alan says:

    Hello Eranda — Thanks for your comment. Graphrex works for us on Eclipse 3.5, so we should be able to help you ;) I’ll email you directly and, once we figure our the problem, I’ll post the solution in the forum.

  2. Eranda says:

    Can’t install to eclipse 3.5 Is there new version for fit with eclipse 3.5 ?