Pre-regex check for req or sec on #2

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants

bardiel commented Nov 12, 2012

Cache-enabled!

Owner

reconbot commented Nov 13, 2012

This works, but I opted to just modify the regex to be lenient and take both forms with non capturing parentheses. Less complexity.

var re = /(\d+) bytes from (.+): icmp_(?:r|s)eq=(\d+) ttl=(\d+) time=([\d.]+) ms/;

reconbot closed this Nov 13, 2012

bardiel commented Nov 13, 2012

Well that's even better, indeed. I'll have to admit I still have to get used to regex... =P

Until next ping version, I say...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment