This GitHub repository hosts a demo Angular project that showcases the usage of the magic-regexp package, an innovative and type-safe alternative to regular expressions (RegExp). With magic-regexp, you can work with regular expressions in a more readable and maintainable way while benefiting from TypeScript's static typing.
Regular expressions can be powerful but often lead to complex and hard-to-maintain code. The magic-regexp package addresses these issues by providing a type-safe and readable alternative. This demo project demonstrates how to integrate and utilize magic-regexp in an Angular application.
To run the demo project locally, follow these installation steps:
Clone this repository to your local machine:
git clone https://github.com/apvarun/magic-regexp-angular-demo.git
Navigate to the project directory:
cd magic-regexp-angular-demo
Install the project dependencies using npm or yarn:
npm install
# or
yarn install
In this demo project, we've set up a simple Angular application that uses magic-regexp to perform common regex-related tasks. You can explore the usage of magic-regexp in the following files:
src/main.ts: This file contains sample code that demonstrates how to use magic-regexp to validate and extract data from strings. Feel free to modify and experiment with the code to get a better understanding of how magic-regexp can simplify working with regular expressions.
To see the magic-regexp in action, follow these steps:
Start the development server:
ng serve
Open your web browser and navigate to http://localhost:4200/ to access the demo application.
You will find an example usage of magic-regexp on the page.
Contributions to this demo project are welcome! If you have any improvements or additional features to suggest, please create a pull request. Be sure to follow our code of conduct.
MIT