You don't need this add-on to do that, it can be done with queries.
Take a backup first.
Code:UPDATE xf_post SET message = REPLACE(message,'[ytube]','[MEDIA=youtube]');
Code:UPDATE xf_post SET message = REPLACE(message,'[/ytube]','[/MEDIA]');
[URL]http://www.megaupload.com/?d=74FPEVFL[/URL]
[URL='http://www.megaupload.com/?d=F16HJRLD']My homework: maths[/URL]
[URL]http://www.megaupload.com/?d=JJKT6RIS[/URL]
#\[url="http://(?:www.)?(megaupload)[^=]+=([^"]+)"]([a-z0-9\s-\[\]()]+)\[/url]#siu
#\[url(?:]|=')(http://(?:www\.)?megaupload\.com/\?d[^\[']+)(?:(?:'])?[^]]+])#siu
#\[url="http://(?:www.)?(megaupload)[^=]+=([^"]+)"]\[/url]#siu
Am I missing something?
You are right. I want to remove them but if they have an anchor text I want to keep it.I need more information because from my perspective I am missing something....
Think of it this way...all I know is that you want to match a MU link, but in reality I also need to know what you are going to do with it...do you want to capture the thing as one group and remove it, do you have a new bbcode to display upload links and need to have the whole link broken into capture groups so that you can use the matches to build your replacement?
These things drastically change the needed expression. Let me know what you want to do with the link so I can pass you something relevant.
[URL]http://www.megaupload.com/?d=74FPEVFL[/URL]
[URL='http://www.megaupload.com/?d=F16HJRLD']My homework: maths[/URL]
[URL]http://www.megaupload.com/?d=JJKT6RIS[/URL]
Link removed
My homework: maths
Link removed
so are you just keeping the text or do you need the link value for like a custom bbcode or something?You are right. I want to remove them but if they have an anchor text I want to keep it.
Code:[URL]http://www.megaupload.com/?d=74FPEVFL[/URL] [URL='http://www.megaupload.com/?d=F16HJRLD']My homework: maths[/URL] [URL]http://www.megaupload.com/?d=JJKT6RIS[/URL]
Would become
Code:Link removed My homework: maths Link removed
Just keeping the text.so are you just keeping the text or do you need the link value for like a custom bbcode or something?
megaupload
#(\[URL)(])(http://www.megaupload.com/\?d=)([^]]+)(\[/URL])#siu
\1='\3\4'\2Link Removed\5
megaupload
#(?:\[URL='http://www.megaupload.com/\?d=[^']+'])((?:.*?(?!\[/URL]?)).)(?:\[/URL])#siu
\1
This is the logical thing to do in this case
First add the link removed text to all MU links with no description and then make all MU bbcodes have the same exact format
Quick Find:
Code:megaupload
Regular expression:
Code:#(\[URL)(])(http://www.megaupload.com/\?d=)([^]]+)(\[/URL])#siu
Replacement String:
Code:\1='\3\4'\2Link Removed\5
Now they are all the same and you can replace all megaupload links with the text
Quick Find:
Code:megaupload
Regular expression:
Code:#(?:\[URL='http://www.megaupload.com/\?d=[^']+'])((?:.*?(?!\[/URL]?)).)(?:\[/URL])#siu
Replacement String:
Code:\1
[URL]http://www.megaupload.com/?d=74FPEVFL[/URL]
[URL='http://www.megaupload.com/es/?d=CO980GLE']Capítulo 1:El Autobot Spike[/URL]
[URL='http://www.megaupload.com/es/?d=QOSC74G7']Capítulo 2:Cambiando a Gears[/URL]
[URL='http://www.megaupload.com/?d=M138WOTQ']Capítulo 3: La ciudad de acero[/URL]
[URL='http://www.megaupload.com/es/?d=6YRNO71Z']Capítulo 4:El ataque de los Autobots [/URL]
I'm not blaming you for anything. Actually I really appreciate the time you spend on thisYou need to give better examples then because they do catch ALL things specified by what you originally asked for... (I will take the blame for the replacement where I placed a \1 it should have been a \3 but that would not account for not matching in the first place)
View attachment 75292
View attachment 75293
The character that breaks all the regex in your new example is í which has nothing to do with the regular expression and everything to do with that character which wasn't in your first example , changing that to i and the expressions work...that and the ones that would have been caught but didn't have an /es/ in the link which again I don't use MU so when I say be specific about examples I mean it, otherwise it costs me too much time that I can not afford for me to have to research what could be on your board when it is easier for you to find whats on your board and post it here showing different examples that display ALL of the differences and uniqueness and me only have to work for free once.
I don't have any more free time today so I will let someone else take care of it.
[URL]http://www.megaupload.com/?d=74FPEVFL[/URL]
#(?:\[URL='http://www.megaupload.com/es/\?d=[^']+'])((?:.*?(?!\[/URL]?)).)(?:\[/URL])#siu
I need to see it on your board to be sure of things and know what I am trying to match for sureWhile we were on IPB, the tagging feature worked something like the following. Can someone please hep out with the replacement expression.
Code:#[member='Renegade']
While what you are implying is correct the way you apply it to the situation is not...there is not a like a magic expression or a way for the replacement addon to know if your expression applies to your text needed to be matched.I have installed this add on, but when I click Proceed anything happens, I see the same screen. But if there is a error in the regular expression it throws a error.
Your expression is not correct, just because it didn't throw any errors it does not mean it matched anything..all it means is you made a syntactically correct regular expression.Here is my input, I checked my regular expression it is correct.
Quick Find: <strong>
Regular Expression:/^(<strong?)(\>)$/
Replacement String: (BBCode for bold)
Any thoughts?
Thanks
strong
#(<strong>)((?:.*?(?!</strong>?)).)(?:(</strong>))#siu
[b]\2[/b]
It's rather time consuming to explain of all things regex and I just don't feel that me trying to teach someone regex is wise (I'm self taught) so ... without having save changes checked run the expression and post an example match and it's corresponding replacement, then I can tell you if you should proceed with saving it.Thanks @EQnoble I see a list of matching string, I believe if I check and click proceed it should replace it with BBcode. If you can explain the regular expression or point me to a documentation it will be helpful.
Thanks a lot.
<STRONG>S360</STRONG>[b]S360[/b]
<STRONG>bestbuy.com</STRONG>[b]bestbuy.com[/b]
<STRONG> </STRONG>[b] [/b]
<STRONG><A href="http://service.test.com/test/click?bid=37919389&site=38776522&bfpage=gway_88x31">BA686</A></STRONG> [b]<A href="http://service.test.com/test/click?bfmid=37919389&site=38776522&bfpage=gway_88x31">BA686</A>[/b]
We use essential cookies to make this site work, and optional cookies to enhance your experience.