MATLAB: How to search for a string in a text file that has carriage returns within the string

MATLABstrfind strrep return \n

I have a text file I am trying to locate strings. Lets say that the txt file looked like this:
'hello
world'
When I search for the string 'hello world' the above txt file would yield 0 results. How can I go about getting a result for this instead of it being overlooked?
Thank you for the help. Will

Best Answer

str = regexprep(str,'\r\n|\n|\r',' ') or strtrim to remove formatting from the string and THEN doing a string search solves this issue
Related Question