I’m trying to come up with a regular expression that will qualify on the 25 in this string:
Always - 25 (Lifetime
The amount of space between the - and the 25 can be variable, but the trailing (Lifetime will always be there.
I’ve tried this: preg_match('/\s(.*)\s\(Lifetime',$sString,$aMatch); but it qualifies on the 25 and everything preceding it.
Try the following:
It matches one or more space characters, followed by a number and finally the
(Lifetimestring.