Abacre Home > Advanced Find and Replace Home

More about deleting of trailing CRLFs

One of the most often problems why AFR can't find text that you specify is trailing CRLFs at the end of "Text to Find" and "Replace by Text".

Lets make a little vocabulary:

[CRLF] - caret + line feed, normally these two chars are inserted when you press Return (Enter) button.

[Cursor] Position of cursor in text.

[Space] - space char.

Suppose, you would like to find paragraph of text consisting of just two lines:

Variant 1:

Sentence #1 here[CRLF]

Sentence #2 here[Cursor]

In fact you represent this paragraph like this, but indeed you may enter it in this way, if you will press Return at the end of last line:

Variant 2:

Sentence #1 here[CRLF]

Sentence #2 here[CRLF]

[Cursor]

or even if you press Return twice it will be like this:

Variant 3:

Sentence #1 here[CRLF]

Sentence #2 here[CRLF]

[CRLF]

[Cursor]

So when you supposed first variant, AFR will search for second or third and will not find the text that you want. Therefore we have added "Delete trailing CRLFs" option. When this option is checked event if you typed as in Variant 3, AFR will delete trailing CRLFs and transform it to Variant 1.

Another often problem is when you place unwanted spaces at the end of your text. Suppose that you want to replace text as in Variant 1. If you occasionally entered spaces at the end or the lines it might look like this:

Variant 4:

Sentence #1 here[Space] [Space] [CRLF]

Sentence #2 here[Space] [Cursor]

Therefore be careful and delete these spaces.

See also: General options | Find options | FAQ