[hiline] Support extended regex on Linux and *BSD.
[hiline] Fix two bugs.

- From the previous commit, on Linux and BSD we should not escape the
  grouping parentheses as we are using extended regex;
- When the pattern contains ^ or $, then don't have ".*" before or after
  it.