Cata
Cata

Reputation: 101

Regex Expression to capture new lines in a group

I am trying to capture all new lines inside a group.This what I am trying to capture.So I have this string:

<span style="color: #00cc00;">1.207.245.184:80
1.234.28.114:80
1.234.28.160:80
1.234.28.18:80
1.234.28.20:80
</span></span></pre>

I want to capture the proxies inside a group,but each proxy is on a separate line.How can I do that? I tried this expression but it won't capture all lines.

<span style="color: #00cc00;">(.*)(\n.*)

This only captures the first proxy and the second one ( on the second line ).

Upvotes: 0

Views: 650

Answers (1)

SergeyAn
SergeyAn

Reputation: 764

May be this will work:

/([\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}:[\d]{2,4})/g

Upvotes: 4

Related Questions