Use Posix Extended Regular Expressions for Linux

And eliminate signed/unsigned mismatch for GCC