Interactive Regular Expression Tool

Version 4.1.1 (217 ko) par Stephen23
Develop and refine regular expressions in an interactive figure that shows all of REGEXP's outputs.
1,9K téléchargements
Mise à jour 7 mars 2026

Afficher la licence

Finally, new features of UIFIGURE allowed me to write the GUI that I wanted to write 10 years ago...
Features
IREGEXP is a simple interactive tool to help develop regular expressions: IREGEXP lets you write a regular expression and see REGEXP's outputs update in real-time.
IREGEXP consists of just one Mfile which creates a UIFIGURE with three input text-boxes (for the input text, the regular expression, and any optional arguments) and two UITABLES which display all of REGEXP's outputs. Drop-down menus control the EOL character(s) and how space & control characters are displayed.
IREGEXP can be used in two ways (and in any combination of these two ways):
  1. interactively by typing directly into the figure's text-boxes, or
  2. by calling the function with exactly the same inputs and options as REGEXP itself.
Keep It Simple
IREGEXP is intended to be the simplest interactive regular expression tool on FEX: no highlighting, no links, no colors, no buttons, no java code, no file parsing, no apps to install, no third-party dependencies... just this one Mfile is all you need. IREGEXP aids fast development of a regular expression, especially by allowing editing using only the keyboard (use the TAB key to switch between the text-boxes), to parse short pieces of text.
Examples
>> str = 'bat cat can car coat court CUT ct CAT-scan';
>> rgx = 'c[aeiou]+t';
>> idx = iregexp(str,rgx)
idx = [5,17]
>> str = 'EXTRA! The iregexp function helps you relax.';
>> rgx = '\w*x\w*';
>> mat = iregexp(str,rgx,'match')
mat = {'iregexp','relax'}
MATLAB <R2023b
Click on the "Version History" tab and download version 3.1.1. It does not have all the nice features of UIFIGURE, but works as documented :)

Citation pour cette source

Stephen23 (2026). Interactive Regular Expression Tool (https://fr.mathworks.com/matlabcentral/fileexchange/48930-interactive-regular-expression-tool), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2010b
Compatible avec les versions R2023b et ultérieures
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur String Parsing dans Help Center et MATLAB Answers
Version Publié le Notes de version
4.1.1

* Update screenshot

4.1.0

* Add "Optional Arguments" text box.
* Capture and display error messages.

4.0.3

* Add newline dropdown menu

4.0.2

* Add Placeholder text (for empty text fields).
* Code tweaks.

4.0.1

* Change default space character representation
* Added examples to HTML documentation

4.0.0

* Total rewrite using UIFIGURE and UIGRIDLAYOUT
* Text fields using UITEXTAREA and UIEDITFIELD
* Text callbacks using VALUECHANGEDFCN (i.e. no more dodgy keypress hack!)

3.1.1

* Fix bug in token display with 'once' option.
* Improve documentation.

3.1.0

* Display string outputs with "".
* Return string outputs as string.
* Add HTML examples.

3.0.0

* Allow string class input arguments.
* Improve pretty-print local functions.

2.1.1

* Added fix suggested by Zhuohe Liu.

2.1.0

* Simplify code with UITABLE (replacing multiple UICONTROL text boxes).

2.0.0.0

* rename function.
* try to make HG2 compatible (needs testing).
* simplify internal handling of output arguments.

1.1.0.0

* Display outputs in edit boxes (as these have scrollbars).
* Input string can change ParseString edit box to multi-line.

1.0.0.0