Staredit Network Profile-Scene FaRTy1billion basic
Profile for FaRTy1billion
Options
Send me a Message
Find my Posts
Find my Topics
Send me Minerals

Last visitors
Devourer, Mini Moose 2707, sakuckoinvius, Dem0n, Fire_Kame

Account Information
Joined: Mar 13 2005, 12:04 am
Last Active: Today, 12:49 am
Status: Offline
Display Name: O)FaRTy1billion[MM]

Statistics
Activity: 2990
Posts: 5367
Posts Per Day: 1.4
Topics: 38
Minerals: 584

Contact Information
E-Mail: Lewl coming soon // No spambots

Battle.net
Starcraft I: Not Given.
Starcraft II: Not Given.


Signature
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!
[02:17 pm]
Vrael -- returns ":80"
[02:17 pm]
Vrael -- >>> re.findall(r'[0-9]+(?:\.[0-9]+){3}(:[0-9]+)?', "192.168.1.1:80")
[02:16 pm]
Vrael -- or returns rather, I'm using python's re module
[02:16 pm]
Vrael -- in practice that expression only captures ":80"
[01:04 pm]
Roy -- If you're working with capture groups, you should write the expression as '(\d+(?:\.\d+){3}):(\d+)', so that $0 would be the IP+Port, $1 would be just the IP, and $2 would be just the port.
[01:00 pm]
Roy -- poiuy_qwert
poiuy_qwert shouted: Vrael Its because you are only capturing the port, you want something more like '([0-9]+(?:\.[0-9]+){3}(?::[0-9]+)?)'
It's still capturing the whole IP address the way he has it. The first capture group ($0) is always the entire match. Your change just makes the second capture group ($1) the same as the first.
[10:27 am]
Devourer -- Fire_Kame
Fire_Kame shouted: I love devourer tho. :3
Wing Zero
Wing Zero shouted: I <3 ypu :dev:
Mini Moose 2707
Mini Moose 2707 shouted: I do, too. This is why I must help him become the best.
<3333
[04:44 am]
poiuy_qwert -- Vrael
Vrael shouted: can anyone explain to me why this regex '[0-9]+(?:\.[0-9]+){3}(:[0-9]+)?' finds ":80" in the IP string "192.168.1.1:80" and not the whole string?
Its because you are only capturing the port, you want something more like '([0-9]+(?:\.[0-9]+){3}(?::[0-9]+)?)'
[04:09 am]
Roy -- Vrael
Vrael shouted: can anyone explain to me why this regex '[0-9]+(?:\.[0-9]+){3}(:[0-9]+)?' finds ":80" in the IP string "192.168.1.1:80" and not the whole string?
It doesn't. Your parser is broken.
[03:39 am]
jjf28 -- #alwaysThePessimist
Please log in to shout.


Members Online: Deactivated; testing around! :)