`your_command | tee test.txt` =~ /your_capturing_regex/