Perl RegEx in Mac terminal: grep -p "^([^\t]*\t){2}mypattern\t" textfile.txt doesn't work
RegExPlanet offer a Regular Expression Test Page for Perl. This page works with Safari on macOS 10.12.

You may find that grep included with macOS does not include all the functionality you want. If so, try installing grep from Homebrew or MacPorts.