If you want to do this in one pass, you can use awk instead of grep.
Format:
echo "some text" | awk '/pattern to match/ && !/pattern to exclude/'
Examples:
- echo "hello there" | awk '/hello/ && !/there/'
Returns nothing.
- echo "hello thre" | awk '/hello/ && !/there/'
Returns: hello thre
- echo "hllo there" | awk '/hello/ && !/there/'
 
                        