Introduction
This application can be split into two main sections: the workspace and the testing area.
Workspace
This section of the page is where you assemble blocks to make regular expressions (regex). Below you can see all of its parts labeled with descriptions.
- Block Bank
The Block Bank holds all the possible blocks at your disposal. - Clear All
The Clear All button refreshes the Canvas AND all of your tests (learn more in the “Testing” section). - Canvas
You can drag and drop any and all blocks from the Block Bank into the Canvas, here. All blocky expressions must begin with the first Expression block that is always present in the Canvas. Any blocks not conntected, in some way, to that block will not be accounted for the generated regex. - Generated Expression
The Generated Expression displays the regex created through the blocks within the Canvas.
Testing
Testing
Here is a table where you can test your assembled blocks/regex. Each row represents an independent test case. Below you can see all of its parts labeled with descriptions.
- Text
In the Text area, you type in an example of text/string that you want to test for. As you enter text into the last row of the table, a new empty row will automatically append to the end of the table. If you delete text from the second to last row (i.e. the last non-empty row), that row will automatically be removed from the table. - Match Variable
The Match Variable, or “Should Match?” column, determines if the Text is supposed to be a match from the regex or not. If it is checked, the application will see if the generated expression matches the Text. If not, the logic will be inverted. - Test Result
The Test Result, or “Result” column, shows whether the test passed (✓) or failed (X). As an example, let’s say the blocks generated regex to match with any text that starts with “ab”. Then, “abc” was typed into the Text area and the “Should Match?” was checked. Result would show a ✓, because the test passed. Alternatively, if “Should Match?” was unchecked for the same test, the Result would be X. - Clear Tests
The Clear Tests button resets the testing table, but not the Canvas.
Testing Example
Suppose you want to find text that starts with anything but a capital letter. A very simple solution is the following blocky expression:
Some tests you could run include: