2013-02-09 41 views

回答

0

只是字符串本身會工作。如果你想這個字符串,只需使用字符串零寬度斷言的開始/結束:

^thankYou\.sjs\?donate_path$ 
+0

是的,但問題是,字符串不能以thankYou.sjs開頭 – user2057787 2013-02-09 23:00:49

+0

給我一個輸入和輸出示例 – 2013-02-09 23:13:01

+0

我想我想出了這個查詢:^ thankYou \ .sjs \?donate_page。*請讓知道這是否工作。我需要查詢返回僅包含上述字符串的頁面。 – user2057787 2013-02-10 01:40:31

0

@ExplosionPills:我想你忘記了問號的特殊含義。 如果你不逃避它,你的表達:

^thankYou.sjs?donate_path$ 

將匹配

thankYou.sjsdonate_path 

thankYou.sjdonate_path 

且不說點的特殊含義。

所以我想這樣的事情應該工作:

thankYou\.sjs\?donate_path 

此外,如果有可能的是,donate_path不在查詢字符串中的第一個,你可以使用這個:

thankYou\.sjs\?([^&]*&)*donate_path 
相關問題