1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BBCode replacement using Kier's Post Content Replacement Tool

Discussion in 'Troubleshooting and Problems' started by MsJacquiiC, Dec 12, 2012.

  1. MsJacquiiC

    MsJacquiiC Well-Known Member

    I've 100+ posts that have the following/similar bbcode:

    Code:
    [mp3=San Zeno by Zach Finch]http://jpicforum.info/audio-poem-of-the-day/zach-finch_san-zeno.mp3[/mp3]
    What I would like to do is to tranform these bbcodes to how my new mp3 bbcode is formatted. Like so:
    Code:
    [mp3=http://jpicforum.info/audio-poem-of-the-day/zach-finch_san-zeno.mp3]San Zeno by Zach Finch[/mp3]
    So I'm basically switching the url to the track name and vice versa. I have Kier's Post Content Replacement Tool installed. I suppose the Quick Find string will be mp3=

    So I'm looking for the Regular Expression and the Replacement String. Is this possible?

    Thanks for any assistance!

    J.
     
  2. Slavik

    Slavik XenForo Moderator Staff Member


    Jakes your man for Regex.
     
    MsJacquiiC likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  4. EQnoble

    EQnoble Well-Known Member

    REGEX
    #\[mp3=(.+)\]\[url\](http://.+mp3)\[/mp3\]\[/url\]#si

    REPLACEMENT
    [mp3=\2]\1[/mp3]




    edit....AHHHHHHNNNNNND snipered
     
  5. MsJacquiiC

    MsJacquiiC Well-Known Member

    LOL @ EQnoble :p
    Much appreciation guys! The tool did it's magic and I'm sure has saved me 2-3 hours of busywork!
    Thanks so very much ;)

    J.
     

Share This Page