php - REGEX Pattern help -


i want form pattern match word "jason" in following string:

[lastuser=jason;22] 

any ideas?

the following matches name , following number:

preg_match('/\[lastuser=([^;]*);(\d+)\]/', $str, $matches); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -