I am getting response from Jmeter like this:
Try something like:
encounterId=([0-9]+)
and use group 1 as the result.