fixed regexp for directives pattern