私はリンクを含む文字列変数を他のテキストの中に入れています。特定の顧客を含むすべてのリンクを抽出できます。 ...これは可能ですか?Googleのアプリケーションスクリプトで文字列のすべてのリンクを抽出します。
変数の文字列のようなものです。内容として文字列を使用して文書を作成するために、extract links from documentして、リンクを抽出し、しかし、私はやりたい:回避策として
var string = 'here is some text line among the ones there will be links like https://stackoverflow.com/questions/40725199/extract-all-links-from-a-string-with-google-app-script?noredirect=1#comment68679843_40725199 and more';
、私はここで説明したものを使用しましたそれを直接...
よろしく、(ルーベンへ)
EDIT:
私が使用している場合:
var string = 'http://mangafox.me/manga/tales_of_demons_and_gods/c105/1.html here is some text line among the ones there will be links like https://stackoverflow.com/questions/40725199/extract-all-links-from-a-string-with-google-app-script?noredirect=1#comment68679843_40725199 and more ';
私は最初のリンクを2回だけ取得しました(スクリーンショットhereを参照)。
と私が使用している場合:
var string = 'here is some text line among the ones there will be links like https://stackoverflow.com/questions/40725199/extract-all-links-from-a-string-with-google-app-script?noredirect=1#comment68679843_40725199 and more http://mangafox.me/manga/tales_of_demons_and_gods/c105/1.html ';
同じ再び(screenshoot hereを参照してください)。
あなたが "内部リンクを含む文字列変数" とはどういう意味ですか?彼らはURLですか?サンプルの文字列を含めて、あなたが意味するものを明確にすることができます。何を試しましたか? –
可変文字列は次のようなものです: var string = 'ここには、http://stackoverflow.com/questions/40725199/extract-all-links-from-a-string-withのようなリンクがあります。 -google-app-script?noredirect = 1#comment68679843_40725199以上 '; –