I'm sure I did it before, but cannot find this in my files.

I have a local variable that contain an error message like : "USER ERROR : password for user XTEST error"

And I want to get the username with the following regex : (?<=password for user ).{1,8}

(I don't have any reference to the user CN or association in the error status message)

The regex works fine, but I don't know how to apply the regex directly to the variable ?

Probably in XPATH expression ?