Looking for help with advanced MyCode replacement
As the AutoMedia plugin stopped embedding Vimeo for some reason, I am trying to create a MyCode that does the job. I would like to do it the best way: taking a simple URL and converting it into an embedded video with no [] [/] tags at all. I am trying NOT to use the standard [MyCode] tags.

I cannot get the replacement to work, and have not been able to find a good example or tutorial to help.

Here's what I have:

Regular Expression:

<iframe src="http://player.vimeo.com/video/$1?title=0&amp;byline=0&amp;portrait=0&amp;color=ae4815" width="480" height="270" frameborder="0"></iframe>

Test Input:

Test Result:
<iframe src="http://player.vimeo.com/video/?title=0&amp;byline=0&amp;portrait=0&amp;color=ae4815" width="480" height="270" frameborder="0"></iframe>24410924

The problem is that it's not doing the replacement; it's not putting the video id number at the $1, and leaves the video id number at the end of the output.

Experimenting, I found that this kind of replacement DOES WORK when I put a single space after the Regular Expression AND after the Test Input. What does this tell me? I'm not exactly sure, but I think it needs a known character for closure. I would like to avoid that however... perhaps I could tell it to replace only a string of numbers and end input if anything else is encountered?

This seems to be an advanced problem and I would appreciate any help or guidance.

Thanks Smile

Messages In This Thread
Looking for help with advanced MyCode replacement - by Monaco - 2011-06-06, 03:09 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)