Search Regex

Mô tả

Search Regex adds a powerful set of search and replace functions to WordPress posts, pages, custom post types, and other data sources. These go beyond the standard searching capabilities, and allow you to search and replace almost any data stored on your site. In addition to simple searches you have the full power of PHP’s regular expressions at your disposal.

You can use this to do things like:
– Help migrate a site from one domain to another
– Update URLs in links and images
– Perform site-wide changes

Search filters can be created to match any column of any WordPress table. For example:
– Find all posts in a category
– Find all post meta data without a post
– Find all posts in a date range

Search Regex handles small and large sites.

Search Regex has been tested with PHP from 7.0 to 8.3.

What can I search?

You can search:
– Posts
– Pages
– Any custom post type
– Comments (including spam)
– Users
– Meta data
– WordPress options
– Supported plugins (such as Redirection)

Full regular expression support is provided, and you can capture data and use it in the replacement.

Actions

A variety of actions can be performed on matching results:
– Modify and replace the result
– Delete the result
– Export to CSV and SQL
– Perform custom PHP action

Modify and Replace Data

Results can be individually modified by clicking on the item to change, and using the popup modifier.

Bulk modifications can be performed against all matching results.

The types of modification depend on the data being changed:
– Numbers can be added or subtracted to existing numbers
– Hours, days, weeks, and months, can be added to dates
– Tags and categories can be added, removed, and substitued

Custom shortcodes are supported that allow dynamic data to be included:
– Add the current date and time, in any format, to content
– Insert data from other columns. For example, insert the category into the title
– Transform existing data. For example, convert case, change underscores to dashes.

Example uses

Some ideas for potential uses:
– Delete all comments that match a phrase
– Add a category to all matching posts
– Remove orphaned meta data

Support

Please submit bugs, patches, and feature requests to:

https://github.com/johngodley/search-regex

Please submit translations to:

https://translate.wordpress.org/projects/wp-plugins/search-regex

Translations

Translations are provided by WordPress itself. You can update the translations by going to the Dashboard > Updates section of WP admin.

Tài liệu

Full documentation can be found on the Search Regex site.

Ảnh màn hình

  • Search options
  • Inline search and replace
  • Inline editor

Cài đặt

The plugin is simple to install:

  1. Download search-regex.zip
  2. Unzip
  3. Upload search-regex directory to your /wp-content/plugins directory
  4. Go to the plugin management page and enable the plugin
  5. Configure the options from the Tools/Search Regex page

You can find full details of installing a plugin on the plugin installation page.

Đánh giá

16 Tháng Một, 2025
Dear John, you are so GODLEY!! thank you for this wonderful super helpful plugin! May I buy you a ticket to Disneyland?? 😉
16 Tháng mười hai, 2024
Incredibly powerful search tool for your dashboard, especially useful if, for example, you’ve moved to a new server (or a new site structure), or someone’s changed their name, or any other reason you might need to update a lot of things at once in the same way. Risky too – make sure you preview any replacements first!
3 Tháng mười, 2024
Works perfectly. For those having issues, you need to proceed with regex with caution (always backup first), as the plugin notes.
1 Tháng mười, 2024
Why on earth does the entire post get deleted when I’m only trying to replace a string? While attempting to delete specific keywords across multiple posts using the ‘Delete Matches’ button, the entire posts containing those keywords were deleted. There was no warning, and the posts didn’t even move to the trash. This tool is absolutely terrible.
1 Tháng chín, 2024
An absolute must-have for people migrating huge data and having to correct loads of broken links. Does for free, with a quite powerful interface, what others promise to provide if you pay first.
20 Tháng tám, 2024
For a plugin called SEARCH REGEX, maybe have REGEX enabled by default? For a title feature to be hidden in dropdown is a bit annoying. If someone is installing this, they clearly looked for REGEX eh? I’d suggest keeping REGEX enable/disable a separate setting that is always visible.
Đọc tất cả 95 đánh giá

Người đóng góp & Lập trình viên

“Search Regex” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

“Search Regex” đã được dịch qua 7 ngôn ngữ. Cảm ơn những người tham gia dịch vì đóng góp của họ.

Dịch “Search Regex” sang ngôn ngữ của bạn.

Muốn tham gia phát triển?

Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.

Nhật ký thay đổi

3.1.2 – December 29th 2024

  • Fix crash when loading from a preset with an ‘includes any’

3.1.1 – November 23rd 2024

  • Update for WordPress 6.7

3.1.0 – August 8th 2024

  • Update for latest WP
  • Fix export of regular expression result
  • Switch to WP core translations
  • See changelog.txt for more details