Reputation: 5149
Using the following input:
223.25.99.163</td>
<td ng-bind="proxy.PORT" class="ng-binding">1180</td>
This regex is failing to match
(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})<\/td>.*?(\d{1,5})<\/td>
Upvotes: 1
Views: 42
Reputation: 1236
You can also insert singleline
(dot-all
) modifier (?s)
to the regex like this.
(?s)Your-regex
Upvotes: 1
Reputation: 18950
Your problem is most likely that the .
does not match the newline.
Basically, you have two options: Replace the dot with a even broader match: [\s\S]
is common:
(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})<\/td>[\s\S]*?(\d{1,5})<\/td>
Or you use the singleline/dot-matches-all regex option: RegexOptions.Singleline
Upvotes: 2