Jump to content

matmushroom

New Members
  • Posts

    2
  • Joined

  • Last visited

matmushroom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry, maybe I've explained it a big wrong. The <before> and <after> should mean that there is some random text. So instead... <before>http://www.soundcloud.com/artist/track<after> <before>www.facebook.com/page<after> <before>www.youtube.com/watch?v=1234567<after> <before>www.somesite.com/bla<after> ...it could also be like this... Blablabla http://www.soundcloud.com/artist/track www.facebook.com/page is my page Try www.youtube.com/watch?v=1234567 for my video Check http://www.somesite.com/bla. I would like to automatically insert different wordpress shortcodes inside a user generated post, exchange urls with videos or soundcloud widgets and create regular links from all the other URLs and emails. Thanks for helping guys. greetz, Mat
  2. Hey guys. I have a string like this: <before>http://www.soundcloud.com/artist/track<after> <before>www.facebook.com/page<after> <before>www.youtube.com/watch?v=1234567<after> <before>www.somesite.com/bla<after> I created this RegEx to find and replace URLs with preg_replace ((https?:\/\/)(www\.)|(https?:\/\/)|(www\.))[^ <]+ ...but how I extend that RegEx to match all URLs which are NOT Youtube or Soundcloud URLs. Thanx for helping. Mat
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.