#!/bin/bash
s="The default username and password is 'user' and 'ZWiliWH8E2mV'."
grep -oP ".*'\\K[^']+(?=')" <<< "$s"