Skip to content

Instantly share code, notes, and snippets.

@TLMcode
Last active March 3, 2017 18:47
Show Gist options
  • Save TLMcode/4c42069d22c111253437d7e200b554b6 to your computer and use it in GitHub Desktop.
Save TLMcode/4c42069d22c111253437d7e200b554b6 to your computer and use it in GitHub Desktop.
Returns a source url from a html fragment ident
GetSourceURL( str )
{
FragIdent := RegExReplace( str, "i).*<b.*?>(.*?<!--s\w{11}t-->).*", "$1" )
For Each, Ident in StrSplit( FragIdent, " " )
if InStr( Ident, mStr := "SourceURL:" )
SourceURL := SubStr( Ident, StrLen( mStr )+1 )
Return SourceURL
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment