Library
Class

Library\Helper\Regex

class Regex

Regex helper

As for all helpers, all methods are statics.

For convenience, the best practice is to use:

use Library\Helper\Regex as RegexHelper;

Methods

static string getPattern(string $string = '', string $delimiter = '#', string $options = 'i', bool $strict = false)

Get a read-to-use regular expression from a string pattern

Details

at line 49
static public string getPattern(string $string = '', string $delimiter = '#', string $options = 'i', bool $strict = false)

Get a read-to-use regular expression from a string pattern

Parameters

string $string The string to construct the expression
string $delimiter The delimiter to use for the expression (default is #)
string $options The options to use for the expression (default is i)
bool $strict Strictly match the string (default is false)

Return Value

string