|
Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2015-8-29. : 5:04 am] jjf28 -- btw SEN-attatchments and database uploads no werk, though I assume that's on purpose atm[2015-8-29. : 3:38 am] Fire_Kame -- do I want to play 100% Orange Juice and cry, or do I want to write?[2015-8-29. : 3:33 am] Wing Zero -- DevourerDevourer shouted: Do you want your own smiley? Do me too![2015-8-29. : 2:37 am] O)FaRTy1billion[MM] -- I don't think he ever wasn't a demon, he's just not very good at hiding it[2015-8-29. : 2:22 am] rayNimagi -- Do you think in the process of slaying demons he himself became a demon?[2015-8-29. : 2:19 am] poiuy_qwert -- RoyRoy shouted: poiuy_qwert So this is actually more accurate than I first gave you credit for. there are so many flavours/implementations of regex out there, I got a little lucky answering without asking for more info ![]() [2015-8-29. : 2:11 am] poiuy_qwert -- RoyRoy shouted: poiuy_qwert 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. It depends on the regex library/function he uses, since he said it was only capturing the port I assumed he was using one where there it doesn't capture the whole match[2015-8-28. : 7:27 pm] Moose -- Fire_KameFire_Kame shouted: Tell me, what was demon like before he knew the words "gay" "retarded" and "alcohol" poop[2015-8-28. : 5:52 pm] Roy -- poiuy_qwertpoiuy_qwert shouted: Vrael Its because you are only capturing the port, you want something more like '([0-9]+(?:\.[0-9]+){3}(?::[0-9]+)?)' So this is actually more accurate than I first gave you credit for.[2015-8-28. : 4:47 pm] Roy -- As per the docs: The string is scanned left-to-right, and matches are returned in the order found. If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group.[2015-8-28. : 4:44 pm] Roy -- The fix is as simple as making the check for the port be a non-capturing group.[2015-8-28. : 4:44 pm] Roy -- According to a quick search, it appears re.findall will return the entire match if there are no other capture groups defined, or an array of each capture group. Since you're capturing :[0-9]+, it returns an array with just that result.[2015-8-28. : 4:41 pm] Roy -- Check the documentation for the module you're using; it could be that it's returning the last capture group or something.[2015-8-28. : 4:40 pm] Roy -- Here's the JS if you don't believe me: console.log('192.168.1.1:80'.match(/[0-9]+(?:\.[0-9]+){3}(:[0-9]+)?/));[2015-8-28. : 4:39 pm] Roy -- VraelVrael shouted: in practice that expression only captures ":80" Testing with the .NET implementation and JavaScript implementation, as well as on Regex Pal, it captures the IP+port.[2015-8-28. : 4:19 pm] Fire_Kame -- Tell me, what was demon like before he knew the words "gay" "retarded" and "alcohol"[2015-8-28. : 4:08 pm] jushiiin -- And sorry for Demon, for not having a contact. BTW, I seceded from the clan ![]() [2015-8-28. : 4:06 pm] jushiiin -- Long time no see! I'm Zecaff..`jushin, and I was busy learning logic pro X.[2015-8-28. : 3:05 pm] NudeRaider -- Dem0nDem0n shouted: Scrubs. https://www.youtube.com/watch?v=p_XUkT50tcY[2015-8-28. : 2:47 pm] Dem0n -- I saw moose's shout was at 10:30 then I saw Vrael's was at 10:17 and I was incredibly confused.[2015-8-28. : 1: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.[2015-8-28. : 1:00 pm] Roy -- poiuy_qwertpoiuy_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.[2015-8-28. : 10:27 am] Devourer -- Fire_KameFire_Kame shouted: I love devourer tho. :3 Wing ZeroWing Zero shouted: I <3 ypu Mini Moose 2707![]() Mini Moose 2707 shouted: I do, too. This is why I must help him become the best. <3333[2015-8-28. : 4:44 am] poiuy_qwert -- VraelVrael 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]+)?)'[2015-8-28. : 4:09 am] Roy -- VraelVrael 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.[2015-8-28. : 3:30 am] jjf28 -- they're actually in the process of updating their infrastructure at the moment; though this doesn't speak well for their redundancy[2015-8-28. : 2:45 am] Moose -- Now I'm definitely sure what slows us down. Thank you, widespread internet outage! |
NudeRaider