Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Pine:
Checking a RegEx Pattern Against an Array of Strings
Jun 21, 2019 @ 14:30:01

Checking multiple strings against the same pattern is a common task in development. Usually, we use multiple preg_match for checking values, however, PHP provides a nice function that allows us to provide an array to the checker.

The “Old” Way Let’s say we need to check if the req...

tagged:

Link: https://pineco.de/checking-a-regex-pattern-against-an-array-of-strings/


Trending Topics: