Skip to content

longxya/regexdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

A visualizer, debugger, and editor for C#-style regex.

regexdev focuses on making the internal structure and matching process of regex visible.
It parses regular expressions into an AST, visualizes them, and allows step-by-step debugging of the matching process.


🎬 Demonstration

All functions

Demonstration3

Parsing

Parse1

Debugging

Debug1

Editing

Edit

Multi-Display

MultiDisplay1

Breakpoints

Breakpoints


πŸš€ Features

  • πŸ” Regex AST visualizer
  • 🐞 Step-by-step regex debugger
  • ✏️ Interactive regex editor
  • 🧩 Breakpoints in the matching process
  • πŸ–₯️ Multi-panel / multi-view display
  • 🎞️ Matching process playback

βœ… Verification & Correctness

How does regexdev ensure the matching process is correct?

The matching results are continuously verified against the official C# regex engine:

  1. Compare Index and Length of every capture in every group
  2. Compare the total number of Matches
  3. If any difference is detected, a warning will be shown immediately

This makes regexdev suitable not only for visualization, but also for learning, debugging, and validating complex regex behavior.


🏷️ Tags / Capabilities

  • Regex Visualizer
  • Regex Debugger
  • Regex Editor
  • Regex Breakpoint System
  • Multi-View Regex Inspection

🧠 About the Code

⚠️ Important note

This repository currently contains only the regex parser.

The full regexdev tool also includes a matcher, debugger runtime, and UI layers, but those parts are not open-sourced yet due to ongoing refactoring and cleanup.

Why only the parser?

This project originally started as an experimental tool, and the early matching implementation was tightly coupled and difficult to maintain.
Recently, I redesigned and rewrote the regex parser from scratch with a much cleaner architecture:

  • Explicit AST-based design
  • Clear separation of parsing stages
  • Easier to inspect, extend, and visualize

As a result, the parser became the most stable and reusable part of the project, and is published independently.

Especially:

I wrote a C# regex to replace the lexer and handle most grammar checks.

I didn’t want to write a lexical analyzer. 🚫

Extension point

If you want to experiment with your own parsing logic or build additional tooling on top of it, the main entry point is:

new RegexParse().Parse(...)

This allows you to focus on analysis, visualization, or matching logic,
without having to implement a regex lexer from scratch.


πŸ’» Console Demo

A minimal console application is included to demonstrate the parser behavior.

Type a regex expression, then enter parse on a new line and press Enter to see the parsed AST output. 3ac9b184-e044-4ee9-bff8-aff03b881621 bf41a97a-9685-4457-bf99-2707d6b2404b


πŸ“’ Feedback, Suggestions, and Discussions are Very Welcome!

I’d love to hear your thoughts on this project. If you have any suggestions, issues, or feature requests, please feel free to open an issue or contribute to the discussion.

Your feedback will help make this project even better! πŸš€


πŸ“„ License

MIT

Releases

No releases published

Packages

No packages published

Languages