使用//代替https://或http://从文本中提取网址

hello, im using Embera (depending on Oembed)

the problem is this

 protected $urlRegex = '~\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))~i';

Embera just understand http or https, how i can make it supports // like that//youtube.com/watch?v=J-iyznGQ

or i want a php regex function fix and url with // to http://

\b(?:https?:)?//[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))

This should work for you.