In paw first set up the request to the login page. Then in a second request you can asses the response body of the first request: we can use a regex filter on the raw response of another request.
create a custom dynamic value
:

then use the code below to set the custom dynamic value.
function evaluate(context){
// Set up your regex to extract the token
var re = /<h2>([^<]+)<\/h2>/;
// Replace the 'Login page' with your request name
var request = context.getRequestByName('Login page')
var lastExchange = request.getLastExchange()
var body = lastExchange.responseBody
var m = re.exec(body)
return m[1]
};