Skip to content

Commit e6a71aa

Browse files
committed
Creits and FAQ sections
1 parent 986d46f commit e6a71aa

File tree

1 file changed

+87
-7
lines changed

1 file changed

+87
-7
lines changed

README.md

Lines changed: 87 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Like what we're doing? Show your support with a quick star, please! ⭐
4949
- **[Testing and Debugging Your Regex Patterns](#testing-and-debugging-your-regex-patterns)**
5050
- **[Contributing to EloquentRegex](#contributing-to-eloquenttegex)**
5151
- **[Support](#support)**
52+
- **[Credits](#credits)**
53+
- **[Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)**
5254

5355
# Overview
5456

@@ -1025,7 +1027,9 @@ Testing and debugging are critical steps in ensuring your regex patterns do exac
10251027

10261028
# Contributing to EloquentRegex
10271029

1028-
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help makes EloquentRegex even better for everyone. We follow the classic GitHub contribution flow. Here's how you can get involved:
1030+
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help makes EloquentRegex even better for everyone. We follow the classic GitHub contribution flow. Below is how you can get involved.
1031+
1032+
_Note: Checking [STRUCTURE.md](https://github.com/MaestroError/eloquent-regex/blob/update-documentation-and-add-advanced-usage-section/STRUCTURE.md) out may help you understand the package better 👍_
10291033

10301034
### Getting Started
10311035

@@ -1063,11 +1067,11 @@ git push origin feature/my-new-feature
10631067

10641068
### Submitting a Pull Request
10651069

1066-
**Pull Request (PR):** Navigate to the original EloquentRegex repository on GitHub. You'll see an option to "Compare & pull request" for your branch. Click it to begin the process of submitting a PR.
1070+
1. **Pull Request (PR):** Navigate to the original EloquentRegex repository on GitHub. You'll see an option to "Compare & pull request" for your branch. Click it to begin the process of submitting a PR.
10671071

1068-
**Describe Your Changes:** Provide a detailed description of the changes in the PR. Include any relevant issue numbers. Explaining the reasoning behind the changes and how they improve EloquentRegex will help reviewers understand your contribution.
1072+
2. **Describe Your Changes:** Provide a detailed description of the changes in the PR. Include any relevant issue numbers. Explaining the reasoning behind the changes and how they improve EloquentRegex will help reviewers understand your contribution.
10691073

1070-
**Submit for Review:** Once your PR is ready and all checks pass, submit it for review. At least one review from the project maintainers is required for merging. Be open to feedback and ready to make further tweaks based on suggestions.
1074+
3. **Submit for Review:** Once your PR is ready and all checks pass, submit it for review. At least one review from the project maintainers is required for merging. Be open to feedback and ready to make further tweaks based on suggestions.
10711075

10721076
### Review and Merge
10731077

@@ -1091,6 +1095,82 @@ Or use QR code:
10911095

10921096
[<img src="https://github.com/MaestroError/resources/blob/maestro/buymeamilk/qr-code.png" width="135px">](https://www.buymeacoffee.com/maestroerror)
10931097

1098+
# Credits
1099+
1100+
A project like EloquentRegex doesn't come to life in isolation. It's the result of inspiration, assistance, and support from various tools and communities. We would like to extend our heartfelt thanks to the following:
1101+
1102+
- **[Regexr:](https://regexr.com/)** For being an invaluable tool in the creation and debugging of regex patterns. Its intuitive interface and detailed explanations have made it possible to refine and perfect our regex expressions.
1103+
1104+
- **[ChatGPT:](https://chat.openai.com/)** For its assistance in covering the full codebase with PEST tests. [ChatGPT's](https://openai.com/) guidance and suggestions have also been important in creation of this documentation.
1105+
1106+
- **[PEST Framework:](https://pestphp.com/)** For being an incredibly user-friendly and expressive testing framework. Its elegant syntax and powerful features have made writing tests a joy, contributing significantly to the quality of EloquentRegex.
1107+
1108+
A special thank you goes out to everyone who has contributed to these tools and resources. Your work has not only aided in the development of EloquentRegex but has also contributed to the broader developer community by providing tools and knowledge that empower us all.
1109+
1110+
# Frequently Asked Questions (FAQ)
1111+
1112+
### What is EloquentRegex?
1113+
1114+
EloquentRegex is a PHP/Laravel package designed to simplify the creation and execution of regular expressions. It offers a fluent, intuitive interface for both building custom regex patterns and utilizing ready-to-use patterns for common tasks like email and URL validation.
1115+
1116+
### How do I install EloquentRegex?
1117+
1118+
EloquentRegex can be installed via Composer. Run the following command in your Laravel project directory:
1119+
1120+
```bash
1121+
composer require maestroerror/eloquent-regex
1122+
```
1123+
1124+
### Can I use EloquentRegex without Laravel?
1125+
1126+
While EloquentRegex is specifically designed with Laravel in mind, the core functionality can be used in any PHP project via `Maestroerror\EloquentRegex\EloquentRegex` object with **the same syntax**.
1127+
1128+
```php
1129+
use Maestroerror\EloquentRegex\EloquentRegex;
1130+
```
1131+
1132+
### How do I use ready-to-use patterns?
1133+
1134+
Ready-to-use patterns can be invoked by calling the corresponding method on the EloquentRegex class. For example, to validate an email address:
1135+
1136+
```php
1137+
$isValid = EloquentRegex::source('[email protected]')->email()->check();
1138+
```
1139+
1140+
### How do I create custom patterns?
1141+
1142+
Custom patterns can be created using the `start` or `customPattern` method. From there, you can chain methods to build your pattern:
1143+
1144+
```php
1145+
$result = EloquentRegex::start('user_123')
1146+
->alphanumeric()
1147+
->underscore()
1148+
->digits()
1149+
->get();
1150+
```
1151+
1152+
### Can I apply options to any pattern?
1153+
1154+
Yes, any options can be applied to any pattern using either a callback function or an associative array. This allows for flexible configuration of your regex patterns. Also, direct arguments to the pattern methods are used as extra, easy-to-use way for applying options.
1155+
1156+
### How do I debug my regex patterns?
1157+
1158+
You can use the `toRegex()` method to get the raw regex pattern string. This can then be tested and debugged using online tools like [Regexr](https://regexr.com/), which provides real-time matching and detailed explanations. Check the [Testing and Debugging](##testing-and-debugging-your-regex-patterns) section for more information.
1159+
1160+
### How can I contribute to EloquentRegex?
1161+
1162+
Contributions are welcome! You can contribute by forking the GitHub repository, making your changes, and submitting a pull request. Please ensure your contributions adhere to the project's coding standards and guidelines.
1163+
1164+
### Where can I report issues or request features?
1165+
1166+
Issues and feature requests can be submitted on the GitHub repository's Issues page. Please provide as much detail as possible to help us understand and address your request efficiently.
1167+
1168+
### How do I stay updated on EloquentRegex developments?
1169+
1170+
To stay updated, follow the GitHub repository for the latest changes, releases, and discussions. You can also watch the repository to receive notifications for all project activities or follow the [author's page](https://www.linkedin.com/in/maestroerror/).
1171+
1172+
---
1173+
10941174
##### To Do
10951175

10961176
- Return captured groups while using `group()` method with `get()`.✔️
@@ -1107,7 +1187,7 @@ Or use QR code:
11071187
- Implement usage of named groups: `/(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})/`
11081188
- Add some tool for debuging options
11091189

1110-
- Write documentation (add credit for https://regexr.com/ and ChatGPT)
1190+
- Write documentation
11111191
- Create quick start guide and add in Docs.
11121192
- Add advanced usage section in Docs:
11131193
- Options and Assertions: Detailed explanation of options, how to apply them, and their effects on patterns. ✔️
@@ -1126,8 +1206,8 @@ Or use QR code:
11261206
- Testing and Debugging ✔️
11271207
- Support ✔️
11281208
- Contributing (+STRUCTURE.md) ✔️
1129-
- Credits
1130-
- FAQs
1209+
- Credits (add credit for https://regexr.com/ and ChatGPT) ✔️
1210+
- FAQs ✔️
11311211

11321212
##### Coming next
11331213

0 commit comments

Comments
 (0)