grep -P: add tests for matching ^ and $