Search Regex

外掛說明

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 Regex handles small and large sites.

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.

Replace Matched Data

Once a match has been made you can replace it with a popup replacer. You can also replace all matches in a database row, and you can replace all matches across your database.

Additionally, if you need to make your change with context of the surrounding content you can use the inline editor to edit the full context.

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

文件

Full documentation can be found on the Search Regex site.

螢幕擷圖

  • Search options
  • Inline search and replace
  • Inline editor

安裝方式

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.

使用者評論

2018 年 8 月 21 日
The documentation is really poor. For simple things it will probably help you out. For what I'm trying to do it just doesn't seem to work without any explanation. Hard to know if I'm using it wrong, if it just doesn't support regex features I need (same regex works elsewhere), or if the plugin is not fully compatible with newer versions of php. Some expressions return a few matches then give me an error: Fatal error: Uncaught Error: Call to undefined method SearchRegex::base_url()...
2018 年 8 月 17 日
The interface is simple yet useful. Particularly, I appreciated the Replace feature allowing me to preview the changes before committing them to the database. It was quick and painless! 🙂
閱讀全部 63 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Search Regex〉的開發相關工作。

參與者

Search Regex 外掛目前已有 4 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將 Search Regex 外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

2.1 – 6th June 2020

  • Support searching and replacing in multiple sources
  • Improve regex search and replace speed
  • Row actions have moved to a dropdown
  • Fix HTML entities in row titles
  • Handle unknown post types
  • Fix global replace showing 0% progress
  • Add Japanese locale
  • Add Dutch locale

2.0.1 – 11th May 2020

  • Comment title now takes you to comment page
  • Improve regex performance when data has large gaps
  • Use correct contact address
  • Support \1 as well as $1 in regular expression captures

2.0 – 9th May 2020

  • Release version 2.0, a ground-up rewrite
  • Handles any size of database without memory issues or server timeouts
  • New and responsive UI with inline replacing of individual phrases
  • Match replacements are updated in real-time, including regular expressions
  • Edit an entire database row with the inline editor
  • Supports custom post types
  • Groups columns from one database together
  • Search in third-party plugins (currently Redirection)
  • Improved regular expressions without needing delimiters

1.4.16 – 21st Nov 2014 and before to 2007

  • Old versions