How do I search for a string in a text file that has carriage returns within the string
이전 댓글 표시
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
댓글 수: 3
B.k Sumedha
2015년 12월 5일
You can use
strtrim
function to remove the spaces between the text and then find the text.
Will Kinsman
2015년 12월 5일
B.k Sumedha
2015년 12월 5일
Happy Coding
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!