tooltip: fixing behaviour of the regexp