Fix regexp for finding directives.