https://github.com/longxya/regexdev
Visualizer, debugger, and editor for regex
https://github.com/longxya/regexdev
c-sharp debugger debugger-visualizer editor regex regex-match regexp visualizer
Last synced: about 1 month ago
JSON representation
Visualizer, debugger, and editor for regex
- Host: GitHub
- URL: https://github.com/longxya/regexdev
- Owner: longxya
- License: mit
- Created: 2025-03-06T02:28:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-05T17:07:30.000Z (about 1 month ago)
- Last Synced: 2026-02-06T03:26:48.500Z (about 1 month ago)
- Topics: c-sharp, debugger, debugger-visualizer, editor, regex, regex-match, regexp, visualizer
- Language: C#
- Homepage: http://www.regexdev.com
- Size: 149 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [regexdev](https://www.regexdev.com/)
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

### Parsing

### Debugging

### Editing

### Multi-Display

### 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](https://github.com/longxya/regexdev/blob/main/RegexDev/RegexParse.cs#L933) 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:
```csharp
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.

---
## 📢 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.
- **[Open an Issue](https://github.com/longxya/regexdev/issues)**
- **[Start a Discussion](https://github.com/longxya/regexdev/discussions)**
Your feedback will help make this project even better! 🚀
---
## 📄 License
[MIT](https://github.com/longxya/regexdev/blob/master/LICENSE)