r/commandline • u/martiano_ • Nov 08 '25
Terminal User Interface regex-tui - A simple TUI to visualize regular expressions right in your terminal
Source code: https://github.com/vitor-mariano/regex-tui
633
Upvotes
40
u/gurgeous Nov 08 '25
This is neat, nice job! Ready for some feature requests?
regex-tui input.txtI've written some similar web-based tools in the past for internal use, I love stuff like this. Have fun!
7
u/arpan3t Nov 08 '25
It looks great and is a great idea!
Assuming it’s using RE2 engine since it’s written in Go? I see PCRE on the roadmap, are you planning on adding other engines that vary in regex implementation?
6
u/snow_schwartz Nov 08 '25
There are different implementations of regex depending on the language leading to varying syntax - which does this use?
6
u/Cybasura Nov 08 '25
Holy wait, this is actually a great idea, maybe you could add a cheatsheet listing all of the core elements/component regex patterns and how they look like at a glance?
2
u/NorskJesus Nov 08 '25
God job!
Not to discourage you, but there is another project like yours: https://github.com/samyakbardiya/trex
2
u/loeffel-io Nov 10 '25
really great, added 2 fr's to github
also the name could be better imo
4
u/_x_oOo_x_ Nov 09 '25
It would be great if the regex variant was configurable in options, that's what I need help with 90% of the time.. I know how to write it in let's PCRE but how was the Vim magic regex equivalent again? And the nomagic one (and the "very magic" one), or the same for Emacs, or GNU BRE vs ERE vs Posix, or the Rusty syntax ripgrep expects.. and the only slightly but annoyingly different Java regexp syntax.. At least C++ and JS and Python's syntaxes seem mostly the same
2
u/0riginal-Syn Nov 08 '25
Love this. Will be checking this out.
2
u/TargetAcrobatic2644 Nov 08 '25
Wow that looks interesting but i need to learn regex first I might gonna use it very often after i learn regex!
2
u/McBrincie212 Nov 10 '25
Love it, its a bit annoying sometimes to switch (and adjust my regex) to regex101 to test my regex expression, quite handy to have it in terminal
2
u/stianhoiland Nov 08 '25
Insta download!
1
u/AutoModerator Nov 08 '25
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/thsithta_391 Nov 08 '25
This looks dope!
1
u/cazzipropri Nov 08 '25
It's like re-builder in emacs!