I'm creating a small IP:PORT scraper in PHP. The problem is that I'm pretty unfamiliar with RegEx.
So I've been piecing together what I can.
Here's what I've got:
/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?):([0-9]{1,5})/
I know this isn't the best. At least not the end to grab the port, because it means that ports will be able to be things like 99999.
Also, it seems to return two matches this way. The IP:PORT and the PORT. I just need it to grab the full IP:PORT, not one or the other.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…