Make lint-locale-dependence.sh
work with BSD grep
by avoiding empty subexpressions.
macOS High Sierra:
0$ grep --version
1grep (BSD grep) 2.5.1-FreeBSD
2$ echo foo | grep -E '^foo(_r|_s)?$'
3foo
4$ echo foo | grep -E '^foo(|_r|_s)$'
5grep: empty (sub)expression
Ubuntu 18.04 LTS:
0$ grep --version
1grep (GNU grep) 3.1
2$ echo foo | grep -E '^foo(_r|_s)?$'
3foo
4$ echo foo | grep -E '^foo(|_r|_s)$'
5foo
Reported by @masonicboom in #13708 (review). Thanks!