make api match intent with less specific type
Merge pull request #1648 from deads2k/dev/deads/tidy-compile-regex-api

make api match intent with less specific type