Following Org mode refiling gobbles a newline and absorbs the next heading where Org mode refiling has gobbled some of the next heading, I want to search for those gobbled headings where the stars are not preceded by newlines. I wrote this regular expression with
It shows 16 matches and I confirmed that some are relevant. But
search-forward-regexp with the same expression matches every character. I suspected it was due to escaping the backslash in the
re-builder literal, which uses double-quotes, and
works to find lone stars.
I did not see double backlashes in the manual page.
Why does this happen, and when do backslashes need to be escaped?