Notes of Using Easy Replace

Invisible characters

If you have experienced with replacement across lines, you would know, that's a problem. Those invisible characters are often annoying and confusing. The reason is, frist, they are invisible, so you may not know which one it is, or where it is, or you can't input some one easily, second, those invisible ones may be displayed different by different text editors, and may be changed automatically while copying and pasting.

Here's a list of some notes about those invisible characters you would like to know. There are three types of linebreak, a carriage return, a line feed, and a line break composed of both of them. With different files there may be different line breaks there, some file uses carriage returns, some uses line feeds, and more uses both of them. Carriage return and line feed are in same function, but are different characters in ASCII, carriage return is numbered 13 in ASCII, while line feed is 10. In the beginning, carriage return is used in Mac, and line feed is used in Windows. But now, most softwares can recognize them both, but for most compatibility, most files and softwares use both of them together as a line break marker. But in replacement, especially in regular expression driven replacement, each character must be exact, or it will not match at all, you will get nothing, or wrong result. So knowing exactly of the line breaks is very important.

In Easy Replace, it's always \r\n when you press enter.

In general, Windows always use compound line break(a carriage return and a line feed) which expressed in regular expression and most other languages(such as C++, Java) as \r\n. So when you press key enter while editing, there will be a \r\n in your file's text. So in this software, it's the same, wherever you press a enter, in text monitor, in replace parameter box, it's always a compound line break, \r\n.

\r\n is always invisible, while separate lines

one \r or one \n will be shown as a small square

In many softwares, a \r or a \n will be shown as the same as a whole \r\n, while still splitting lines as it. So it confuses the three line breaks. In Easy Replace, only \r\n will be displayed as normal line break, while any \r or \n not together as a compound line break will be marked as little square. But you still do not know it's a \r or \n, you will have to try them both. For example, you want to replace some text containing a square mark, you should input those characters( or copy) and input \r in regular expression mode, if it doesn't work, you should change it to \n, and try again.

How to input a tab

Windows often use tab to switch focus on software interface. So can't input tab in some place, such as parameter boxes of this tool, but maybe you need a tab in replace with box, how? You can copy a tab and paste in, or you can write \t in regular expression mode.

You can directly input line breaks in parameters

Most replacing tool or replacing panel in text editors doesn't allow user to input parameters multi-lines. But in Easy Replace, you can. but you should know, an input line break is a \r\n. At the same time, you should tell input line break from automatic wrapping.

How to input a \r or a \n

A \r or a \n cannot be input directly, you must use regular expression mode and input the escaped expression as \r or \n, a \r or \n in normal mode will not be recognized as line break. Plus, in replace with box, the rule is the same, but only \r,\n,\t can be recognized, other escaped characters not recognized. All characters need escape in regular expression, such as [].(), should be directly input. For example, we want to change all texts like (abc) at end of line to (abc)- , we should write an expression \(abc\)\r\n in replace box, and an expression in replace with box as (abc)-\r\n