that's not enough information for me, I refer to what I told the gent above...
go to one of the posts that has an ame link that is not youtube and follow the above process so that I can get a better picture of what needs to be done.
Thanks for looking into this:
Basically there are too many different urls to list but the idea is just to replace the "[ame=" with "[U RL=" and "[/ame]" with "[/ U RL]"
[CODE]
- [ame="http://en.wikipedia.org/wiki/Bulletin_board_system"]Tigger BBS[/ame]
- [ame="http://en.wikipedia.org/wiki/Honda"]
Honda[/ame]
- [ame="http://www.vimeo.com/12833600"]Four Wars 3-5-12 on Vimeo[/ame]
- [ame="http://s64.photobucket.com/albums/h170/crawlertypeofguy/?action=view¤t=DSCF2215.flv"]DSCF1215.flv video by crawlertypeofguy - Photobucket[/ame]
- [ame="http://video.google.com/videoplay?docid=8769128457543333500&q=winchester+bay&total=71&start=0&num=10&so=0&type=search&plindex=4"]YouTube - Banshee Bay Oregon[/ame]
[/CODE]
It woudl be quite easy to maybe do this regex "#\[ame\=(.+)\[\/ame\]#siu" but that would destroy the working youtube video urls if this is run while there are still some video urls left. Can something be added to the above short regex to exclude if it contains "youtube" anywhere between the ame tags?
Also, I used a great code you provided some posts earlier and slightly modified it to include all possible subdomian (www, m, de, ca, etc.. ), possibility of having quotes around url and the secure version of youtube urls (https):
From:
Code:
#\[ame\=http\:\/\/(www\.)?youtube.com\/watch\?([a-z]+\=[^\=\&\]]+\&)*v\=([^\]\&]+)(\&[a-z]+\=[^\=\&\]]+)*\][^\[]+\[\/ame\]#siu
To:
Code:
#\[ame\=('|"|)http(s)?\:\/\/[^\.]*(\.)?youtube.com\/watch\?([a-z]+\=[^\=\&\]]+\&)*v\=([^\]\&\"]+)(\&[a-z]+\=[^\=\&\]]+)*('|"|)?\][^\[]+\[\/ame\]#siu
After this update I still ran into a few issues where the following domain were not affected because either the Description was left blank or the description contained brackets:
Code:
- [ame=http://www.youtube.com/watch?v=XjiwBwBL4Qo]YouTube - Classified - "Oh... Canada" [Official Video][/ame]
- [ame="http://www.youtube.com/watch?v=RboEtvkm4RU"][COLOR=#0000ff]YouTube- ATV's Most Wanted Susan Parker[/COLOR][/ame]
- [ame="http://www.youtube.com/watch?v=SZq8WppNFJY"][COLOR=yellow]http://www.youtube.com/watch?v=SZq8WppNFJY[/COLOR][/ame]
- [ame="http://www.youtube.com/watch?v=sWEKU9fEBno"][/ame]
- [ame="http://www.youtube.com/watch?v=9YAPKlk0pfY&feature=related="]YouTube - le burn a la marocaine[/ame]
Any idea on how to modify the above regex to include those or would it be better to just write a separate one for the select few cases?