File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
7272[ Str::mask] ( #method-str-mask )
7373[ Str::match] ( #method-str-match )
7474[ Str::matchAll] ( #method-str-match-all )
75+ [ Str::isMatch] ( #method-str-is-match )
7576[ Str::orderedUuid] ( #method-str-ordered-uuid )
7677[ Str::padBoth] ( #method-str-padboth )
7778[ Str::padLeft] ( #method-str-padleft )
@@ -1084,6 +1085,23 @@ $result = Str::matchAll('/f(\w*)/', 'bar fun bar fly');
10841085
10851086If no matches are found, an empty collection will be returned.
10861087
1088+ <a name =" method-str-is-match " ></a >
1089+ #### ` Str::isMatch() ` {.collection-method}
1090+
1091+ The ` Str::isMatch ` method will return ` true ` if the string matches a given regular expression:
1092+
1093+ ``` php
1094+ use Illuminate\Support\Str;
1095+
1096+ $result = Str::isMatch('/foo (.*)/', 'foo bar');
1097+
1098+ // true
1099+
1100+ $result = Str::isMatch('/foo (.*)/', 'laravel');
1101+
1102+ // false
1103+ ```
1104+
10871105<a name =" method-str-ordered-uuid " ></a >
10881106#### ` Str::orderedUuid() ` {.collection-method}
10891107
You can’t perform that action at this time.
0 commit comments