You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -77,7 +77,7 @@ EloquentRegex::start("#hello #world This is a #test")->hash()->text()->get();
77
77
// ['#hello', '#world', '#test']
78
78
```
79
79
80
-
## Key Features
80
+
## Key Features🔑
81
81
82
82
-**Ready-to-Use Patterns**: Common patterns like emails, URLs, and IP addresses are pre-defined and ready to go. Just a few keystrokes and you're validating.
83
83
-**Custom Patterns Made Easy**: Build your own regex patterns with an easy-to-use, fluent interface. Say hello to readable regex!
@@ -86,7 +86,7 @@ EloquentRegex::start("#hello #world This is a #test")->hash()->text()->get();
86
86
87
87
_For more details about package and it's inner workings check out [STRUCTURE.md](https://github.com/MaestroError/eloquent-regex/blob/update-documentation-and-add-advanced-usage-section/STRUCTURE.md) file._
88
88
89
-
## Getting Started
89
+
## Getting Started🧭
90
90
91
91
Simply install the package via Composer, and you're ready to take the pain out of regex in your PHP/Laravel applications. Run for installation:
EloquentRegex comes with a set of predefined patterns for common validation/extraction tasks. These patterns are designed to be straightforward and easy to use, requiring minimal effort to implement.
161
161
@@ -272,7 +272,7 @@ public function filePathWin(
272
272
273
273
Didn't it cover all your needs? Let's take a look to the custom patterns section.
274
274
275
-
## Custom Patterns
275
+
## Custom Patterns🛠️
276
276
277
277
For scenarios where predefined patterns do not suffice, EloquentRegex allows you to define custom patterns using the start or customPattern methods as initiator:
278
278
@@ -311,7 +311,7 @@ Custom pattern builder supports a wide range of character classes and all specia
Quantifiers in regular expressions are symbols or sets of symbols that specify how many instances of a character, group, or character class must be present in the input for a match to be found. EloquentRegex enhances the way quantifiers are used, making it simpler and more intuitive to define the frequency of pattern occurrences.
317
317
@@ -416,7 +416,7 @@ As you become more comfortable with the basics of EloquentRegex, you might find
416
416
417
417
Whether you're dealing with intricate string formats, dynamic pattern requirements, or simply looking to optimize your regex operations for performance and clarity, this section will guide you through the advanced features of EloquentRegex. You'll learn how to leverage the full power of this package to make your Laravel application's text processing as efficient and effective as possible.
418
418
419
-
## Options
419
+
## Options⚙️
420
420
421
421
EloquentRegex provides a flexible system for applying options to your patterns. These options can serve as extra assertions to refine pattern matching or act as filters to select only specific matches. There are three main ways to apply options: directly as arguments, through a callback, and via an associative array.
422
422
@@ -631,7 +631,7 @@ public function onlyTags(array|string $tags);
631
631
public function restrictTags(array|string $tags);
632
632
```
633
633
634
-
## Regex Flags
634
+
## Regex Flags🚩
635
635
636
636
Regex flags are special tokens that modify the behavior of regular expressions, allowing for more flexible and powerful pattern matching. In EloquentRegex, applying regex flags to your patterns enables specialized matching behaviors such as case-insensitive searches, multiline matching, single-line mode, and support for Unicode characters. Let's explore how to apply these flags using examples.
637
637
@@ -706,7 +706,7 @@ expect($matches)->toContain('და'); // Matches Unicode characters with the Un
706
706
707
707
In addition to character classes and special character methods, builderPattern has more advanced methods for increasing flexibility and usage scope. Below are described the methods for the builderPattern's advanced usage.
708
708
709
-
## Character Sets
709
+
## Character Sets🗃️
710
710
711
711
In regular expressions, character sets are a fundamental concept that allows you to define a set of characters to match within a single position in the input string. EloquentRegex provides an intuitive way to work with both positive and negative character sets, enhancing the versatility of your patterns.
712
712
@@ -753,7 +753,7 @@ When working with character sets in EloquentRegex, it's important to remember th
753
753
754
754
_Update: From now, **0 as argument is optional**, because character classes willn't add default "+" quantifier inside the set_
755
755
756
-
## Groups
756
+
## Groups📦
757
757
758
758
EloquentRegex simplifies the process of creating both capturing and non-capturing groups, allowing you to organize your regex patterns into logical sections and apply quantifiers or assertions to these groups as a whole.
Assertion groups allow for conditional matching based on the presence (positive) or absence (negative) of patterns ahead or behind the current match point, without consuming characters from the string, so that anything inside assertion group willn't be added in matches. See examples below:
826
826
@@ -934,7 +934,7 @@ The `orPattern` method also accepts a quantifier as its **second argument** (aft
934
934
- Grouping and Capturing: How to use groups (capturing and non-capturing) and apply quantifiers to them. ✔️
0 commit comments