Escape regex characters when updating hint

Fixes #76.