Use extended regex syntax instead of pearl syntax.

Improves compatibility with BSD grep.