Support » Plugin: Redirection » Cannot make Some Regex to work

  • kopoba11


    Hi All,

    I successfully migrated from typepad to wordpress, right now I am in process cleaning up some broken links.

    I put bunch of expressions together some work and some do not, I hope someone can take a look and see if I did anything wrong.

    For example:

    /.m/(.*) => /$1 works but when I try to do the following

    /(d*)/(d*)/(.*)/(.*)/atom.xml =>
    /(d*)/(d*)/(.*)/(.*)/atom.xml =>/$1/$2/$3.html/comments/feed/

    does not work, I am trying to match the following

    ​/2008​/08​/british​/comments​/rss.xml => ​/2008​/08​/british.html​/comments​/feed/

    same problem with
    /(d*)/(d*)/index.html => /$1/$2/
    trying to match
    /2011/07/index.html => /2011/07/

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley


    (d*) is not a valid regular expression. I think you mean (\d*)

    You may find this helpful:



    thanks john.

    (\d*) did the trick.

    make sure to fix that code on your main page


    you used it as example

    See code from your site
    < blockquote>
    This pattern tells the plugin that you want to match a URL that looks like:

    </ blockquote>

    Plugin Author John Godley


    Odd, I don’t know how the back slashes disappeared. Thanks for pointing it out

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot make Some Regex to work’ is closed to new replies.