2016-11-24 24 views
-7
# Example Agreement 

`Purpose` You give a short description. 

`Party 1 Name` Seller 

`Party 2 Name` Buyer 

Speak This is the place where {{document advantage}} goes and this is where {{remove fourth}} goes. 

Then there is this: {{remove last two}} Then we will have {{standard time}}. 

Also, {{remove optional widgets}}. Then there is also {{standard list}}. 

https://github.com 

我需要從得到字符串'講直到一個\ n和HTTP是即找到。我需要找到一個匹配,直到HTTP串中發現

說這是{{document advantage}}去的地方,這是{{remove第四}}去的地方。

然後是這樣的:{{刪除後兩個}}然後我們將有{{標準時間}}。

此外,{{移除可選小部件}}。然後還有{{standard list}}。

作爲結果。

這是我試過的。但得到用H

[SS]峯值(+)結束與它的字符串([\ S \ S] +?)(\ n [HTTP] | $)

+2

請分享您的努力。 SO不是**獲取免費**網站的代碼。 – Rajesh

+0

練習正則表達式,特別是看看積極的lookaheads來解決你的問題。 – Eddi

+0

@Rajesh添加了我試過的正則表達式。 –

回答

0

測試這個表達式對您的測試字符串:

([Ss]peak(.|\r|\n)*?(?=http)) 

的部分(?=http)是積極的前瞻,其中聲稱,在您的字符串結束http如下。

相關問題