• Skip to content
  • Skip to primary sidebar
  • Skip to footer

Foliovision

Making the web work for you

Main navigation

  • Weblog
    • FV Player
    • WordPress
    • Video of the Week
    • Case Studies
    • Business
  • About
    • Testimonials
    • Meet the Team
    • We Support
    • Careers
    • Contact
    • Pricing
  • Products
  • Support
    • FV Player Docs
    • Pro Support
  • Login
  • Basket is empty
Affordable VAST/VPAID for Wordpress has arrived. Serve ads with your videos starting today!

Using the Search Regex plugin for WordPress successfully

22 December 2008 / Martin / 2 Comments

If you need to search and replace some text throughout your weblog, you should definitely be using Urban Giraffe's Search Regex. With Search Regex you can search and replace text in all the fields shown in the picture below:

search regex 1
Search Regex

If you are replacing some text, first enter the Search pattern and press the Search button. This will show you the results, so you can fine tune the pattern to get only the results you want. You also get a set of links to view and edit the post. Very handy.

search regex 2
Search Regex results

If you are satisfied with your search results, you can enter the Replace pattern. Then press Replace button. You will get all list of all the search results together with the preview of how the text will look like after the replace. Now you can manually decide if you want to replace each one of search results by clicking replace.

search regex 3
Search Regex replace

When replacing some text on your website always make sure to search through each of these fields (use the Source drop-down menu):

  • Post content
  • Post meta value (catches meta descriptions and keywords)
  • Post title
  • Post excerpt

Replacing the word in Post content is often not enough, if you don't also search Post title and Post meta and Post excerpt you will miss instances.

While it's possible to have changes made immediately (Replace All), we recommend you that you avoid Replace & Save, as this will alter your posts immediately. Use only if you are 100% sure what you are doing and you have a huge number of changes to make.

Search Regex has even more powerful replacement options, via regular expressions. If you have some programming skills and you understand Perl compatibile Regular Expressions you can check Regex checkbox and extend the functionality of this great plugin.

Regular expression on the following screenshot will search for every occurance of word 'easy' without blank space before it.

search regex 4
Search Regex regular expressions

Writing about regular expressions could be a subject to a whole new article or even set of articles. If you want to know more about regular expressions, here are some interesting links:

  • http://php.net/manual/en/reference.pcre.pattern.syntax.php
  • http://www.phpf1.com/tutorial/php-regular-expression.html

So remember to be extra careful when using the replace function and good luck fixing your articles.

Martin Vicenik

Martin Viceník

Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.

Share
Tweet
Share
0 Shares

Categories: WordPress

Related Posts

  1. FV WordPress Flowplayer Downgrading

    FV WordPress Flowplayer Downgrading

  2. How to Sponsor a WordPress Theme Successfully | How to audit a theme sponsorship

    How to Sponsor a WordPress Theme Successfully | How to audit a theme sponsorship

  3. How to Build a Multilingual Site via WordPress Plugins

Reader Interactions

Comments

  1. ngadimin 30 March 2011 at 2:57 pm

    Hi martin

    I’m trying to match with attributes tag using this pattern:
    @(\.*?)@

    but always return nothing, i search the plugin developer site, but he didn’t reply the question of this kind of problem. can you help me?

    the sample data i want to match is

    Reply
  2. Martin 31 March 2011 at 12:19 am

    Hello ngadmin,

    that regex doesn’t make much sense, it’s searching for at least zero occurrences of a dot symbol. If you want to search for multiple dot symbols in string, you need to use this:

    @(\.{2,})@

    You need to HTML encode any special input with HTML in our comments, you can use this tool: opinionatedgeek.com/dotnet/tools/htmlencode/encode.aspx

    Thanks,
    Martin

    Reply

Leave a Reply to Martin Cancel reply

Your email address will not be published. Required fields are marked *

You can click here to Subscribe without commenting

Primary Sidebar

Categories

  • Business
  • Cameras
  • Case Studies
  • Design
  • Flowplayer
  • Internet Marketing
  • IT
  • Life
  • SEO
  • Slovak
  • Video of the Week
  • WordPress

Footer

Our Plugins

  • FV WordPress Flowplayer
  • FV Thoughtful Comments
  • FV Simpler SEO
  • FV Antispam
  • FV Gravatar Cache
  • FV Testimonials

Free Tools

  • Pandoc Online
  • Article spinner
  • WordPress Password Finder
  • Delete LinkedIn Account
  • Responsive Design Calculator
Foliovision logo
All materials © 2021 Foliovision s.r.o. | Panská 12 - 81101 Bratislava - Slovakia | info@foliovision.com
  • This Site Uses Cookies
  • Privacy Policy
  • Terms of Service
  • Site Map
  • Contact
  • Tel. +1 518 412 4600