Reputation: 4481
How I can get all data between tags?
My RegExp: \<table id\=\"listtable\".+\>(.*)\<\/table\>
result:
I think it because there are line breaks. How to fix it?
Thanks in advance.
Upvotes: 1
Views: 69
Reputation: 786091
To make it match across multiple lines you can use this regex:
/<table id="listtable"[\s\S]*>([\s\S]*)<\/table>/ig
Use of [\s\S]*
instead of .*
makes it match it across new lines.
Upvotes: 1