I want to form a pattern to match the word "Jason" in the following string:
[LASTUSER=Jason;22]
The following matches the name and the following number:
preg_match('/\[LASTUSER=([^;]*);(\d+)\]/', $str, $matches);