Hongmu Notes

✏️ Batch replacement of multiple contents

Write multiple "original text = new text" rules at one time and replace them one by one.

Instructions for use

  • The rules are written as "original text = new text", one line per line, arranged from most to least length.
  • The left side matches according to regular rules; empty left side and illegal regular rules will prompt
  • Leaving the new article blank is equivalent to deleting the hit content.

Capturing group replacement

If you want to keep the original word and only adjust the text before, after or on both sides of it, use a capturing group.

Basic writing method

Use parentheses on the left to enclose the parts to be retained.

The right side is quoted by serial number, and the serial number corresponds to the order in which the brackets appear.

Keep the original word

Write back the quote on the right to keep the original word and add the text before and after it.

There is no need to copy the original words line by line, and the rules are shorter.

Reverse the order

The two paragraphs of text are captured separately in parentheses, and the right-hand side is quoted in the new order.

It is suitable to rewrite "first name, last name" to "first name".

Literal reminder

When a reference symbol appears on the right, it will be treated as a reference, and literals must be escaped first.

When unsure, test run with a small sample of one or two lines first.

Check method

After the test run, check whether the retained original words appear completely.

If the serial number is written incorrectly, it will reference other content. It is most stable to test it one by one.

All keywords and tutorials 12

❓ FAQ

What should I do if I just want to write literal symbols on the right side?
Escape the symbol first, otherwise it will be quoted as captured content.
Can you change the order of the two paragraphs?
Can. The two paragraphs are captured in parentheses, and the right side can be quoted in the new order.