Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[Str::mask](#method-str-mask)
[Str::match](#method-str-match)
[Str::matchAll](#method-str-match-all)
[Str::isMatch](#method-str-is-match)
[Str::orderedUuid](#method-str-ordered-uuid)
[Str::padBoth](#method-str-padboth)
[Str::padLeft](#method-str-padleft)
Expand Down Expand Up @@ -1084,6 +1085,23 @@ $result = Str::matchAll('/f(\w*)/', 'bar fun bar fly');

If no matches are found, an empty collection will be returned.

<a name="method-str-is-match"></a>
#### `Str::isMatch()` {.collection-method}

The `Str::isMatch` method will return `true` if the string matches a given regular expression:

```php
use Illuminate\Support\Str;

$result = Str::isMatch('/foo (.*)/', 'foo bar');

// true

$result = Str::isMatch('/foo (.*)/', 'laravel');

// false
```

<a name="method-str-ordered-uuid"></a>
#### `Str::orderedUuid()` {.collection-method}

Expand Down