In a rueful manner; causing, feeling or expressing regret or sorrow.
He pushed his straw hat back, scratched his head, and laughed ruefully.