問題タブ [predefined-variables]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
54 参照

regex - URLから単語をチェックして抽出する方法

Go の組み込み正規表現 pkg のドキュメントはこちら: https://golang.org/pkg/regexp/ Go の正規表現 テスター: https://regoio.herokuapp.com

定義済みの単語のリストがあります。

異なる URL 文字列で上記の単語のいずれかを確認しようとしています。

私が試した正規表現は次のとおりです。

次のことも試しましたが、探している単語ではなく、穴の文字列が返されます。

正規表現「エンジン」の最後の式の何が問題なのかわかりませんが、括弧内のものだけを覚えておく必要があります。