mdfind search string with underscores not working
I am migrating my method to find strings in files to mdfind.
But when I search for a string with underscores it does not find the file I should be finding.
Setup:
A file in a lone directory with the following contents:
this_is_a_test
thisIsATest
When I search for thisisatest it works
% mdfind -onlyin . thisisatest
..../test/afile
but if I search for this_is_a_test it does not work, I get no output returned
% mdfind -onlyin . this_is_a_test
Is there some secret sauce to search for strings with underscores?
Any help is appreciated.
MacBook Pro with Touch Bar