File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -334,12 +334,11 @@ Methods to Search and Replace
334
334
u('foo')->equalsTo('foo'); // true
335
335
336
336
// checks if the string content match the given regular expression.
337
- // You can pass flags for preg_match() as second argument. If PREG_PATTERN_ORDER
338
- // or PREG_SET_ORDER are passed, preg_match_all() will be used.
339
337
u('avatar-73647.png')->match('/avatar-(\d+)\.png/');
340
- // result = ['avatar-73647.png', '73647']
341
- u('avatar-73647.png')->match('/avatar-(\d+)(-\d+)?\.png/', \PREG_UNMATCHED_AS_NULL);
342
338
// result = ['avatar-73647.png', '73647', null]
339
+
340
+ // You can pass flags for preg_match() as second argument. If PREG_PATTERN_ORDER
341
+ // or PREG_SET_ORDER are passed, preg_match_all() will be used.
343
342
u('206-555-0100 and 800-555-1212')->match('/\d{3}-\d{3}-\d{4}/', \PREG_PATTERN_ORDER);
344
343
// result = [['206-555-0100', '800-555-1212']]
345
344
You can’t perform that action at this time.
0 commit comments