Reputation: 15
I have this text
Owner's Name : John doe
State : New York
Country : US
Address : address line 1
address line 2
46000
Tel. No. (Off) : xxxx
I would like to use regular expression to capture
Address : address line 1
address line 2
46000
This stops at the Tel line...
(doesn't capture).
Been trying to use lookahead but to no avail.
Upvotes: 1
Views: 91
Reputation: 785058
You can use this regex:
Address *: *([\s\S]*?)(?=Tel\. No\.)
Upvotes: 3