Stringy
Stringy copied to clipboard
New method request: match()
Hi. Started using your library today. It has most things, but lacks one that's pretty useful - a method that returns matches based on a regex pattern (More specifically, returns the matches from a preg_match. Maybe we can also have a matchAll() method corresponding to preg_match_all function).
Def agree. At that point, we need to decide whether or not to expose mb_ereg_match with its quirks and differences to preg_match
I'll let you decide that.
I found this method could be useful. @danielstjules how about exposing both methods: s('whatever')->pregMatches('/[a-b]+/')
and s('whatever')->eregMatches('what*')
? as an alias method we might want to expose just s('whatever')->matches('/[a-b]+/')
this is where we should see what's more popular ereg_match
or preg_match
.