質問

私はこの正規表現を2日間GAで目標を設定するために作業しようとしましたが、頭をつかむことはできません...

URL形式は次のようなものです。

/purchase.php?cDd=1&transaction_id=xxxxxxx&verify=xxxxxxxxxxxxxxxx=&method=creditcard&type=purchase

transaction_id =は、数字の9月が入力されていますverify= 一連の数字、両方のキャップと小文字の文字が入力されています

基本的に、私はそれによって終了するURLのみを一致させたいと思います &method=creditcard&type=purchase

私はちょうど入れようとしました &method=creditcard&type=purchase しかし、それは他のURLも取得します。

役に立ちましたか?

解決

a $ 正規表現の終わりに署名します。

このようにして、あなたはその終わりのURLのみを一致させるように強制します &method=creditcard&type=purchase

^/purchase.php\?cDd=1&transaction_id=[0-9]*&verify=[a-zA-Z0-9]*=&method=creditcard&type=purchase$

また

&method=creditcard&type=purchase$

トリックをするでしょう

他のヒント

任意の動的URL用

^/(.*)&method=creditcard&type=purchase$
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top