I'm trying to verify that my string matches a pattern. That is, the full string can be written as that pattern.
However preg_match
returns true
, if any substring matches that pattern.
(E.g. preg_match("#[a-z]*#, "333k")
returns 1
, which I don't want to.
In this example I'd rather verify, the whole string contains only small Latin letters.)