Regexium is a dedicated, small-scale regular expression playground engineered to enhance understanding and debugging. It is built using the modern Vue 3 framework and TypeScript, prioritizing stability and type safety.
Regexium is designed to demystify complex patterns through robust visualization and real-time feedback:
- Real-time Pattern Highlighting: Matches in your test string are highlighted instantaneously as you type, providing immediate visual feedback on pattern validity and scope.
- Interactive Token Explanations: Hover over any component of your regular expression to receive an immediate, almost detailed explanation of its function (its "token").
- Structured Visual Breakdown: The input regex is segmented into distinct, color-coded tokens, transforming an otherwise cryptic string into an understandable, structured visual component.
- Comprehensive Sidebar Analysis: A dedicated sidebar provides a full, aggregated breakdown of all patterns and their meanings present within your regular expression.
This project leverages a contemporary and efficient stack:
- Vue 3 (Composition API): Utilized for reactive, scalable, and modular component development.
- TypeScript: Employed to ensure a high degree of code integrity and robust type checking throughout the application.
- Vite: Selected as the build tool for its exceptional speed.
Follow these instructions to set up and run Regexium locally:
You must have Node.js installed on your machine.
-
Clone the Repository:
git clone [https://github.com/your-username/regexium.git](https://github.com/your-username/regexium.git)
-
Navigate and Install Dependencies:
cd regexium npm install -
Launch the Application:
npm run dev
-
Access: Open your web browser and navigate to the address provided by Vite.
Regexium is designed for intuitive use:
- Enter your Regular Expression: Input your pattern into the top field. You may use the full
/pattern/flagsformat or the pattern alone. - Provide Test Text: Input the text you wish to match into the larger text area below.
- Analyze Results: Observe the real-time matching and highlighting.
- Inspect Pattern Components: Hover over individual regex tokens to view their specific role.
- Review the Sidebar: Consult the sidebar for a synthesized, overall explanation of the patterns used.
The following features are slated for future development:
- Integration of a Flag Selector UI to streamline the selection of regex flags (e.g.,
g,i,m). - Expansion of the explanation dictionary to cover more complex and advanced patterns.
- Inclusion of preset patterns for common use cases to serve as learning examples.