Linefeed, tab and regex in the dedicated search and replace panel

Perhaps I am missing something, but I could not replace linefeeds or tabs using the dedicated search and replace panel. Nor could I use regex for searching.

In case I am not missing something, and it really isn’t there, then this is a feature request :slight_smile:

Do. Not. Say. Regex. :flushed: Haha!

Those characters can’t be used in the Search Inspector (though I talked to @cgrunenberg about this very option earlier this week).

Regex is not supported in this Inspector either and this isn’t necessarily trivial. I’d say its inclusion is not likely, but the request has been noted.

No worries. I can definitely live without it.

Now, in case this one here is feasible, it would be a great help. :wink: I find myself switching windows constantly only to perform minor search and replace operations involving linefeeds.

1 Like

You can paste any string into the Find/Replace fields of the Search inspector including invisible characters like tabs or linefeeds.

Could you check if it is working properly on MD files? I have tried to copy linefeeds but when I hit search it read it as mere white spaces.

Did you preview the document or edit the source?

Edit the source

You’re right, only the replace field supports this. Seems to be a limitation of macOS’ search control.

I am not sure if this is relevant at all, but oddly enough macOS’s TextEditor doesn’t have this limitation.

Hey Jim, what about the inclusion of wildcards and a “ignore diacritics” option? Is it just as unlikely as regex?

@cgrunenberg would have to answer that, but note he did mention this previously: “Seems to be a limitation of macOS’ search control.”.

1 Like

It’s possible (at least in case of text or HTML/Markdown source views) but as far as I remember it’s the first request of its kind and therefore at the end of an already endless list of possible improvements.

Thanks for letting me know, Christian!