Brownian motion

around the essentials…

 

re.place — regexp search and replace WordPress plugin

I wrote a small plugin for WordPress, which can search for specified strings (as regular expressions) in posts and pages and replace them with something else.

Just take a look:

Typed as PARDON, you see as:
nice smile

Typed as , you see as:

Under debugging nice smile

You can download re.place plugin here.

And here is an official re.place plugin page .

(No Ratings Yet)

21 комментар to “re.place — regexp search and replace WordPress plugin”

  1. SecretAgent says:

    Hi there.

    Interesting plugin. Looking good !
    One thing. I can’t reach the options page that is linked to from
    MANAGE / re.place
    It is looking for the files in:
    http://mysite.com/wp-admin/re.place/re.place-options.php

    Shouldn’t that be:
    http://mysite.com/wp-content/plugins/replace/re.place-options.php ?

    Thanks for your effort.

  2. Agent Six says:

    I got the same bug as SecretAgent, using WordPress 2.7.1

    The solution was to rename the directory in the zip file from “replace” to “re.place” and upload that.

    Now works excellently. Thanks!

    • dor says:

      *Agent Six, thank you.*

      I believe Codex renamed that directory itself (removed dot) :-)

      So, now i’ve edited php files to reflect this modification.

      So, *now* the plugin directory is named “replace”, because i don’t know how to “ask” Codex to leave it as is (“re.place”). Sorry for that.

      Thank you!

  3. alain says:

    i want to change the restriction EX: do changes only if user is logged with LEVEL 3 or more. Now the plugin just check if logged or not.
    Is it possible to add this as a new restriction?

    • dor says:

      Mmm… I guess it’s possible, but i need some time…

      First of all, what the UI should be (it would be too bad to choose between “logged”, “logged with level 1″…). Probably, drop-down selection “Logged with level…” followed by drop-down selection with numeric levels?..

      Anyway, I need to RTFM :O)

      Anyway, thank you a lot :-)

  4. Xavid says:

    Hey,

    I was just using your plugin with WordPress 2.9, and I needed to take out the checks for get_magic_quotes_gpc(), so that it always calls stripslashes(), in order to get backslashes to work. Thought you should know. Let me know if you have any questions.

    ~Xavid

    • dor says:

      Mmm… Sorry!-) Didn’t understand. Backslashes do work… You can backslash backslash if you need backslash… As usually…

      I’ve not tried with 2.9 thought.

      Please, what You’re tried to search and how You do specify a replace string?

      • Xavid says:

        In WordPress 2.9, with magic_quotes_gpc Off, if I try to create a pattern like:

        \[fish\]

        then my pattern gets shown on the listing screen as:

        \\[fish\\]

        and works like that pattern, not the pattern I want. This makes it impossible to create some patterns. The fix I mentioned before causes everything to work properly on my WordPress.

        You can see my modified version of the plugin at http://web.mit.edu/xavid/Public/wp-plugins/replace/

        ~Xavid

        • dor says:

          Thank You, Xavid!
          Looks meaningful, now it seems i understand You .)
          I need to check on my 2.8, since i don’t fully understand this magic though.

          Thank You!-)

  5. ReAl says:

    Machines should work, people should think.
    Дякую!

  6. Lars says:

    I have the same problem with this plugin, but first thx for this good plugin… so if I replace something with a link like this

    sources.list

    the plugin automatically escape the ” with \” … the same ‘ -> \̈́’

    I also have “magic_quotes_gpc = Off” in the php.ini and I tested it! If I enable this feature it work fine.

    ; We strongly recommend you use the escaping mechanisms
    ; designed specifically for the database your using instead of relying on this
    ; feature. Also note, this feature has been deprecated as of PHP 5.3.0 and is
    ; scheduled for removal in PHP 6.

    • dor says:

      Thank you, Lars!

      I believed i would “release” next “version” of this plugin with some new features, but now i guess i will just correct this and leave those features for future :-)

      Thank you, indeed!

  7. wendy house says:

    I recently restored a wordpress database contents to a new database. A side effect was the arrival of many  characters replacing ‘spaces’ in nearly all the posts.

    Your plugin has enable me to remove them on the blog. From your description of the plug-in I suspect they still exist in the database.

    My wish-list feature is to add a functionality to make this replacement in the database aswell :-)

    thank you very much – this plugin was easy to find and use

  8. ifanatics says:

    Greetings,

    This plugin works great for most of the content on my site, but I run buddypress, and would like to use it with the buddypress activity stream. Any thoughts on how I could make this work?

    Thanks.

  9. Andrew says:

    I love this plugin, but how can I use it in text widgets?

Leave a Reply

XHTML: Можете використовувати такі теґи: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Recent Posts

Tags

Archives