@RishabhTayal Use sed:
```sh
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36" -sSL "https://www.google.com/search?q=hello" | \
/usr/bin/sed -nE 's/.*About ([0-9,]+) results.*/\1/p'
```
or perl:
```sh
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36" -sSL "https://www.google.com/search?q=hello" | \
perl -nle 'print "$1" if /(?<=About )([0-9,]+)(?= results)/'
```
or even a double grep:
```sh
curl -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36" -sSL "https://www.google.com/search?q=hello" | \
grep -Eo 'About [0-9,]+ results' | grep -Eo '[0-9,]+'
```
Of course there's also gawk, but I'm not sure /usr/bin/awk on macOS supports capture groups.
Seriously though, this is not a googler issue, and the issue tracker is not a discussion forum. This kind of questions should be directly to StackOverflow. If you want to learn text editing with grep, sed, awk, etc., there are plenty of good starting points, a few random ones off the top of my head:
http://www.grymoire.com/Unix/sed.html
http://www.grymoire.com/Unix/Awk.html
http://matt.might.net/articles/sculpting-text/
https://ferd.ca/awk-in-20-minutes.html
And I don't need to introduce Perl resources (maybe start with The Llama Book).
[bpo 32616](https://bugs.python.org/issue32616). The discussion should probably be continued there since I've demonstrated that this is not a Homebrew, or even macOS-specific problem. I'm too tired to do anything else today.