fuckregex
A user-friendly AI-powered tool for those who hate writing regular expressions! Powered by GPT-3.5, FuckRegex helps you generate regex patterns without the headache.
Features
- Generate regex patterns with natural language input
- Interpret entered regex for better understanding
- Validate generated regex patterns
- Generate regex usage examples in popular programming languages
Getting Started
These instructions will help you set up and run the project on your local machine for development and testing purposes.
Prerequisites
Ensure you have golang (v1.20 or later) and postgresql database installed on your system:
Installation
- Clone the repository:
git clone https://github.com/sercanarga/fuckregex.git
- Go to the project directory:
cd fuckregex
- Modify
.env
file:
nano .env
- Create a postgresql database using the sql file under the
resources
directory.
cat resources/*.sql
- Install dependencies:
go mod tidy
- Run the API service:
go run cmd/api/main.go
- Run the web service:
go run main.go
- Open your web browser and visit
http://localhost:8181
(replace8181
with the port number specified in the configuration).
Contributing
We welcome contributions from the community! You can open PRs and issues to help us improve the project.
To-Do
- Implement request moderation for ChatGPT submissions
- Improve security measures
- Add the ability to interpret entered regex
- Introduce regex validation for generated patterns
- Generate regex usage examples in popular programming languages
- Enhance design and source code
License
This project is licensed under the MIT License.
Contributors
Thanks go to these wonderful people
Ertuğrul TURAN |
Samet |
Murat |
A button/link to open in regex101
Using the regex on regex101 with a button or link that shows up once the regex is produced would make the site really useful.
Produced regex:
The value should be URL-encoded when redirecting:
It generates with texts
The prompt requires some improvements.
Listing featured searches, instead of latest ones
Listing recent searches doesn't make sense to me since some people attempt to spam or do useless searches. There should be custom searches, or we should think of something else for the homepage, like how to use the site.