-
-

Replace Next vs. Replace All

-

- To replace the first occurrence of the search term, press Replace Next. You can - continue to press the button until there are no more occurrences. -

-

- To replace all occurrences of the search term, press Replace All. -

-

- There is currently no undo function. If you make a mistake, you can reload the page to - restore the original text. However, you will lose any unsaved changes in text editors and in - text input fields. -

-
-
-

Replacing text in editors and text fields

-

- To replace text in text editors or input boxes you should check the - Input fields only? check box. -

-
-
-

Setup

- +
+
+

The popup at a glance

+

+ Open the popup from the toolbar, or with Ctrl+Shift+S. Type the text you are + looking for into Search for and the text you want instead into + Replace with, then press one of the two buttons at the bottom. +

+

+ The number under the Search for box counts the matches left on the page, and + updates as you type and as you replace. The row of icons along the top opens this help + page, your recent searches, the About panel, the language setting, and your saved rules. +

+
+ The Search and Replace popup, with Condo in the search box, apartment in the replace box, and four matches counted +
+ Four occurrences of Condo are left on the page. +
+
+
+ Warning +

+ Remember to reload any page that was already open when the extension was installed or + updated. Until it is reloaded, the extension cannot reach it. +

+
+
-

Replacing text anywhere on the page

-

- To replace text anywhere on the page, including within the HTML structure itself, - check the Replace HTML? option. This allows you to replace text in - all elements on the page, including regular text, text editors, input fields, and - even HTML tags and attributes. -

+
+

Replace Next vs. Replace All

+

+ To replace the first occurrence of the search term, press Replace Next. You + can continue to press the button until there are no more occurrences. +

+

+ To replace all occurrences of the search term, press Replace All. +

+
+ No undo +

+ There is currently no undo function. If you make a mistake, you can reload the page to + restore the original text. However, you will lose any unsaved changes in text editors + and in text input fields. +

+
+
-
- WARNING: This setup will alter the page HTML and may break the page. You can restore the - page by reloading, but you will lose any unsaved changes in text editors and in text input - fields. -
-

- Basic setup for replacing wikipedia home page title -

-
-
-

Matching the case of text

-

- If you need to replace THIS but not This then you should use the - match case option. -

-

- The following setup will match Condo but not condo. It will - replace Condo with apartment in text fields that are visible on - the page. -

-

-
-
-

Matching whole words

-

- If you need to replace the word partial but not partially then you - should use the Match whole word? option. -

-

-
-
-

Searching hidden content

-

- By default, the extension only searches and replaces text that is visible on the page. - If you need to search and replace text in hidden elements (such as collapsed sections, - hidden divs, or elements with display: none), check the - Hidden content? option. -

-

- This is particularly useful when working with dynamic content that may be hidden initially - but becomes visible through user interaction, or when you need to modify hidden form fields. -

-
- NOTE: When Hidden content? is checked, the extension will search through all - elements regardless of their visibility, which may result in a higher match count. -
-
-
-

Wild Cards and Regular Expressions

-

- If you need to match a partial search term then you should check the Regular Expressions - check box and specify a wild card. You will need to have a very basic knowledge of - regular - expressions - to use this feature. I recommend - regexpal for testing -

-

Before

-

-

Setup

-

-

After

-

-
-
-

Replacing text in WordPress

-

- WordPress is currently on version 6.6, as of March 2023. The post editor has changed - significantly since this extension was created and a new setup is required to replace text - in WordPress. -

-

Setup for WordPress 6+

-

-

Setup for WordPress 5 and below

-

-
-
-

Save and apply on page reload

-

- You can check the Save and apply on page reload? check box to save your search - and apply it on subsequent page reloads. These will take effect even after you have closed - and re-opened your browser. -

-

-

Multiple Matching Rules

-

- If multiple rules apply to the same page, the rules will be applied in order of - most specific to least specific. For example: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
URLSearchReplacePriority
http://www.example.com/a/deeper/nested/pageExampleA1 - applied first
http://www.example.com/some/subpageExampleB2
http://www.example.comExampleC3 - applied last
-

- This means that any changes applied by the first rule will be fed into the subsequent rules. - In the above example, the text Example will have been replaced by the rule - matching http://www.example.com/a/deeper/nested/page. Subsequent rules will - therefore have no effect. -

-

- You can edit the saved rules by clicking on the - - - - - in the extension popup. The URL Pattern field is a - regular - expression, which allows you to apply the same rule to many different websites. -

-
-
-

Reporting Issues

-
-
- Remember to REFRESH the page on which you wish to replace text after installing. +
+

What each option does

+

+ Every checkbox in the popup narrows or widens what is searched. They can be combined. +

+
    +
  • + Match case + + Only matches text with exactly the same capitalisation. Leave it unchecked and + Condo, condo and CONDO all match. + +
  • +
  • + Input fields only + + Limits the search to text boxes, text areas and rich text editors, and leaves the + rest of the page alone. Use it whenever you are editing a form, a message or a + post. + +
  • +
  • + Hidden content + + Includes elements you cannot currently see: collapsed panels, inactive tabs, + off-screen menus and hidden form fields. + +
  • +
  • + Match whole word + + Requires the match to be a whole word, so partial no longer matches + inside partially. + +
  • +
  • + Regular expression + + Treats the search term as a regular expression instead of literal text. + +
  • +
  • + Replace HTML + + Searches the page's HTML source rather than the text you can read, so tags, + attributes, link addresses and alt text are all in scope. + +
  • +
  • + Save and apply on page reload + + Stores the search as a rule and applies it again every time you open a matching + page, even after you restart the browser. + +
  • +
+
+ +
+

Replacing text in editors and text fields

+

+ To replace text in text editors or input boxes you should check the + Input fields only? check box. +

+

+ This covers plain input and textarea boxes as well as rich text + editors such as TinyMCE and CKEditor. Because nothing outside those fields is touched, it + is the safest option on a complicated page, and the one to try first if a replacement + appeared to break something. +

+
+ The popup with the Input fields only checkbox ticked +
Setup
+
+
+ +
+

Replacing text anywhere on the page

+

+ To replace text anywhere on the page, including within the HTML structure itself, check + the Replace HTML? option. This allows you to replace text in all elements on + the page, including regular text, text editors, input fields, and even HTML tags and + attributes. +

+
+ Warning +

+ This setup alters the page HTML and may break the page. You can restore the page by + reloading, but you will lose any unsaved changes in text editors and in text input + fields. +

+
+
+ The popup with the Replace HTML checkbox ticked, replacing example.com with example.org +
+ Rewriting every example.com on the page, link addresses included. +
+
+
+ +
+

Matching the case of text

+

+ If you need to replace THIS but not This then you should use the + match case option. +

+

+ The following setup will match Condo but not condo. It will + replace Condo with apartment in text fields that are visible on + the page. +

+
+ The popup with the Match case checkbox ticked +
Setup
+
+
+ +
+

Matching whole words

+

+ If you need to replace the word partial but not partially then + you should use the Match whole word? option. +

+
+ The popup with the Match whole word checkbox ticked +
Setup
+
+
+ +
+

Searching hidden content

+

+ By default, the extension only searches and replaces text that is visible on the page. If + you need to search and replace text in hidden elements (such as collapsed sections, hidden + divs, or elements with display: none), check the Hidden content? + option. +

+

+ This is particularly useful when working with dynamic content that may be hidden initially + but becomes visible through user interaction, or when you need to modify hidden form + fields. +

+
+ Note +

+ When Hidden content? is checked, the extension searches every element + regardless of its visibility, which may result in a higher match count. +

+
+
+ The popup with the Hidden content checkbox ticked, counting six matches +
+ The same search finds six matches instead of four once hidden elements are included. +
+
+
+ +
+

Wild Cards and Regular Expressions

+

+ If you need to match a partial search term then you should check the Regular Expressions + check box and specify a wild card. You will need to have a very basic knowledge of + regular expressions to use this feature. I recommend + regexpal for testing +

+

+ In the example below, 1\d1 means “a 1, then any digit, then a + 1”, which matches 101, 111, 121 and so on up to 191. +

+
+ The popup with the Regular expression checkbox ticked, searching for 1\d1 +
Setup
+
+
+
+ A grid of numbers with 101, 111, 121 and so on highlighted +
Before
+
+
+ The same grid of numbers, with every highlighted number now reading 101 +
After
+
+
+
+ +
+

Replacing text in WordPress

+

+ The WordPress block editor keeps your post inside a frame of its own, separate from the + rest of the admin page. The extension looks inside that frame for you, so no special + options are needed: type your terms and press Replace All. +

+

+ If you are using the classic editor, or a page builder whose fields are ordinary text + boxes, check Input fields only? first. +

+
+ Tip +

+ The replacement changes what is in the editor, not what is stored. Press + Update in WordPress afterwards to keep it. +

-
- If the page has broken after using the extension, try refreshing the page, and then - checking Input fields only? before performing a search and replace. +
+ The popup replacing Hello world with Something else in a WordPress post, with no options ticked +
+ Editing a post in the block editor. No options are needed. +
+
+
+ +
+

Save and apply on page reload

+

+ You can check the Save and apply on page reload? check box to save your + search and apply it on subsequent page reloads. These will take effect even after you have + closed and re-opened your browser. +

+
+ The popup with the Save and apply on page reload checkbox ticked +
Setup
+
+ +

Editing saved rules

+

+ You can edit the saved rules on the Saved Rules page, which + the save icon in the popup opens. The URL Pattern field is a + regular expression, which allows you to apply the same rule to many + different websites. +

+
+ The Saved Rules page showing two rule cards, each with a URL pattern, search and replace terms, and options +
+ Each saved rule can be edited or deleted here. +
+
+ +

Multiple Matching Rules

+

+ If multiple rules apply to the same page, the rules will be applied in order of + most specific to least specific. For example: +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
URLSearchReplacePriority
http://www.example.com/a/deeper/nested/pageExampleA1 – applied first
http://www.example.com/some/subpageExampleB2
http://www.example.comExampleC3 – applied last
+
+

+ This means that any changes applied by the first rule will be fed into the subsequent + rules. In the above example, the text Example will have been replaced by the + rule matching http://www.example.com/a/deeper/nested/page. Subsequent rules + will therefore have no effect. +

+
+ +
+

History, Swap and language

+

+ The clock icon in the popup lists your recent searches. Click one to put it back into the + two boxes, or press Clear to empty the list. +

+

+ Swap, between the two boxes, exchanges the search and replace terms — handy + for undoing a replacement you have just made, as long as the original text has not been + typed anywhere else on the page. +

+

+ The cog icon holds the language setting. The extension is translated into Arabic, Chinese, + English, German, Hindi, Japanese, Korean, Portuguese, Russian and Spanish; anything not + yet translated falls back to English. +

+
+ +
+

Reporting Issues

+
+ Note +

+ If the page has broken after using the extension, try refreshing the page, and then + checking Input fields only? before performing a search and replace. +

+

Before you report

+
    +
  • + Reload the page. A page that was already open when the extension was installed or + updated cannot be reached until it is reloaded. +
  • +
  • + Browser pages such as chrome://, the Chrome Web Store and the extensions + page are off limits to every extension, so nothing can be replaced there. +
  • +
  • + If the count stays at zero, try Hidden content?, turn off + Match case?, or check that the text is not an image. +
  • +

If you find a bug, please provide a detailed report on the Chrome Extension Store - or on GitHub. + target="_blank" rel="noopener">Chrome Extension Store + or on GitHub.

Please rate - ★★★★★ + ★★★★★ on Chrome Store if the extension helps you!

-
+
-