Presets

Presets are a way of saving a search and replace and then re-using it. You can save your own searches, and you can copy and download existing ones. This makes it ideal if you have actions you need to perform many times.

A preset can ‘lock’ parts of the search form so it cannot be changed.

A preset can also make use of ‘tags’. This allows you to embed tags into the search or replace phrase, and these will be used to make your own custom search forms.

Creating a preset

You create a preset from the search form. At the top of the form is a dropdown with the selected preset, and a tool button.

Clicking the tool button allows you to save the current search form. Clicking this then asks you to pick a preset name.

Once saved the preset is available from the preset dropdown.

If you access the menu while a preset is currently displayed then the ‘save search as new preset’ will change to one that updates the current preset.

Applying a preset

Once you have created a preset you can apply it by selecting it from the preset dropdown.

When applied the search form will be updated with the details in the preset.

Managing presets

Presets can be managed from the preset menu option, at the top of the page. When selected you will be presented with a table of presets, as well as to import and export presets.

A list of actions is found by hovering under each preset:

  • Edit – edit the preset
  • Delete – delete the preset
  • Copy to clipboard – clicking this will copy the preset to your clipboard, and you can paste it elsewhere

Locking fields

Locking a search field removes it from the search form. You would do this if you have a preset where you don’t want certain fields to be changed. If a field is not locked then it can be changed.

A field can be locked by editing a preset and enabling the field in the ‘locked fields’ section:

In the above example the ‘search flags’, ‘source flags’, and ‘results per page’ fields have been locked. When the preset is used the search form will look like this:

Note how the search flags, source flags, and results per page options are not available in the form.

Tagged presets

Tags in a preset allow you to create very customised search forms. They can appear a little complicated, so it’s worth paying attention to how they work. A tagged preset can reduce a complicated search into something that is much simpler to use.

Essentially you create a preset like normal, and inside the search or replace phrase you create ‘tags’. Here the tag SOURCEURL and TARGETURL are placed in the search and replace field:

Tags can be called anything you want, and don’t need to be upper case.

These tags are then added to the list of tags in the advanced preset section:

When the preset is used, instead of being shown the standard search and replace phrases in the search form, you are shown the tags.

When the search is performed, Search Regex will take the values entered into Original URL and New URL and use this instead of the tag values in the search and replace fields.

For example, if you enter https://myoldsite.com in the original URL field above then the actual search performed will be href="https://myoldsite.com.

Sharing Presets

Presets can be exported, either all together in a downloadable file by clicking the ‘export JSON’ button, or copied to your clipboard by clicking the ‘copy to clipboard’ button under a preset.

You can import presets by uploading a preset JSON file:

Or pasting the JSON:

You can find a library of presets to use on the Search Presets page.

See Also

« Replacing | Regular Expressions »

search previous next tag category expand menu location phone mail time cart zoom edit close