use POSIX regex.h for tag matching