in reply to regexp parsing from a big string...
I assume that you want to get an array of users
The problem doesn't have a unique solution unless you know for certain that at least one of the items is always present, say User or the empty line.
I don't know if this is the most elegant approach, but I'd try to split then string on /User / and then, on the resulting array elements, apply a regex like /([^\n]*).*phone =([^\n]*).../ and so on
|
|---|