Find and Replace
Several replacements in order, each one showing how many times it fired
The text
The rules
Rules run top to bottom, each one on what the last one left behind. In pattern mode ^ and $ mean the start and end of a line, and $1 in the replacement puts back whatever the first bracketed group caught.
The result
One replacement is a keyboard shortcut away in any editor. This is for the other job: the six of them in a particular order that you have to do again next week. Every rule says how many times it fired, which is how you spot the one that matched nothing at all.
Rules run in order
Text: "the cat sat"
Rule 1 cat -> dog
Rule 2 dog -> fox
Result: "the fox sat"
Two rules, and the first one's output is the
second one's input. Swap them and you get "the
dog sat" instead. Order is the whole point.Each rule works on what the one above it produced, not on the original text. That makes some jobs easy and one class of job surprising: a rule that turns A into B, followed by one that turns B into C, will take your original A all the way to C.
Usually that is what you want. When it is not, the fix is to replace with something that cannot be matched again, do the rest, then convert it back at the end.
Plain text is the default, and should be
Finding "c++" as plain text: works.
As a pattern: "Nothing to repeat", because + means
"one or more of the thing before it" and there is
nothing before it.
Plain text mode escapes the lot for you, which is
why it is the default.In plain mode every character means itself. A dot is a dot, a bracket is a bracket, and searching for $5.00 finds five dollars instead of failing. That is the right default because most of the time you are looking for something you can see.
The same goes the other way. A $ in the replacement box comes out as a dollar sign in plain mode, instead of being read as a reference to a capture group that does not exist.
Patterns, when you need them
Pattern (\w+), (\w+)
Replace $2 $1
Smith, John -> John Smith
Doe, Jane -> Jane Doe
Brackets catch a piece. $1 and $2 put the pieces
back wherever you want them.Turn on the .* flag and the find box becomes a regular expression. Round brackets remember a piece of what they matched, and$1, $2 and so on paste those pieces back into the replacement, in any order. $& is the whole match.
Two flags are always on and worth knowing about. Every match is replaced, not just the first. And ^ and $ mean the start and end of each line and not of the whole text, because in a document that is almost always what people mean. Putting > at every^ quotes an email in one go.
The pattern that matches nothing, everywhere
Pattern: \s*
Replace: -
This matches nothing, everywhere. Between every
pair of characters there is an empty run of
whitespace, so it fires once per gap and the
result is full of hyphens.
It is not a bug in the tool. It is what the
pattern says.A pattern that can match an empty string will match one between every pair of characters, which is rarely what anybody wanted. It is worth recognising because the result looks completely broken and the cause is a single* that should have been a +.
The count next to the rule is the giveaway: a replacement that fired four thousand times on a short paragraph is telling you something.
Accents are not a replacement
There is no pattern that turns é into e. What there is, is a standard way to split a letter apart from the accent sitting on top of it, after which the accents can all be removed at once. That is what the switch at the top does, and it runs before any of the rules.
It only removes marks that sit on a letter. Þ, ð, æ and ß are letters in their own right, not decorated versions of something else, so they are left alone. Any transliteration of those is a decision about language, not about text, and it is not one this should make for you.
Nothing leaves your machine
The text you paste in never goes anywhere on its own. It is not written to the address bar as you type and it is not saved between visits, so closing the tab is the end of it.
Copy link is the exception, and it is one you have to ask for: that link carries the text along with the rules, so the person you send it to opens what you were looking at. Even then the text sits after the#, which a browser never sends to a server, so it goes to them and to nobody else.