You can download the new tool here.
I have spent a couple of days understanding the methods of the new Formula UI in Alteryx. Based on this I have put together a new UI of the RegEx tool. Leveraging off some of the parts of the Formula tool it supports a preview and syntax highlighting. It is all built on top of the same React components and functions as the other new UIs in version 11. The result are evaluated using the same AlteryxRegEx function in the core AlteryxBasePluginsEngine.dll
Please note, this is based on the undocumented API used by the formula tool so while it works in 11.0 there are no promises of it working in the future versions (and it doesn’t work in older versions). I plan to document up all the workings of this in a later post as well as how I put this together.
Currently, only 3 of the 5 output methods are supported by my UI:
- Match – evaluates to True / False in a new field. Supports Error if not matched.
- Replace – uses a second expression to update input field
- Split to Rows – Tokenise mode splitting into rows
The remaining methods, Split to Columns and Parse, will be implemented in a later update.
In addition, I wanted to have syntax colouring on the Regular Expression. The formula tool uses CodeMirror behind the scenes, so it felt in keeping to use it as well. Combined with some great work Douglas Duteil, there is a gist with the code for adding syntax colouring to Regular Expressions.
To install this tool:
- Download the zip file
- Extract it to a location you want to keep it
- Run Install.ps1 (right click and select Run with PowerShell).
This will add a junction (symbolic link) into the HTML plug ins folder of both Admin and User Installs of Alteryx after which the new Omnibus Regex tool will be available within Parse.
If you want to uninstall the plugin, then run Uninstall.ps1 it will remove the link(s).
The source code of it all is here.