T-Regx
T-Regx copied to clipboard
`PatternTemplate.pattern()` could accept flags
That way, we could build regular expressions with in-pattern flags.
Pattern::template("return @();")->pattern('strlen', 'i');
That would match
return strlen();
return strLen();
return STRLEN();
but not
RETURN strlen();
because return is being matched by the case-sensitive pattern.
It should probably only add them if they differ, and it should ignore order.