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++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -