-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

I need to get the string from `Speak till a \n and http is found ie. I need

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}}.

as the result.

This is what I've tried. but getting the string ending with h with it

[Ss]peak(.+)([\s\S]+?)(\n[http]|$)

Community
  • 1
  • 1
Surya Purohit
  • 1,090
  • 1
  • 9
  • 29

1 Answers1

0

Tested this RegEx against your test string:

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

The part (?=http) is the positive lookahead, which asserts that at the end of your string http follows.

Eddi
  • 782
  • 1
  • 7
  • 20