Here I created an example demonstrating the problem:
Leonardo da Vinci was one of the great masters of the High
Renaissance, especially <br><br>in painting, sculpture, architecture,
engineering, and science.
var oRange = document.body.createTextRange();
// record the current position in a bookmark
var sBookMark = oRange.getBookmark();
var searchString = 'especially \r\n\r\nin painting'
alert(oRange.findText(searchString, 0, 6)) //returns false
alert(oRange.text.indexOf(searchString)) //returns '72', which means that string that I'm looking for is correct
How should I modify search string and/or change function parameters for it to find what I want?
For you convenience, here is the link to function documentation: