Giter VIP home page Giter VIP logo

Comments (9)

dceejay avatar dceejay commented on August 20, 2024

Aha - indeed... Though TTL is not the ping time, and Linux reports them the other way round...
64 bytes from 173.194.65.106: icmp_req=1 ttl=40 time=59.8 ms
so yes more thought required...

from node-red-nodes.

GermanBluefox avatar GermanBluefox commented on August 20, 2024

Just add "i" (case-insensitive) and that should work.

from node-red-nodes.

dceejay avatar dceejay commented on August 20, 2024

yes - but TTL is not the ping time... in your examples the ping time is the "<1" part, not the "=128" part

from node-red-nodes.

GermanBluefox avatar GermanBluefox commented on August 20, 2024

I checked all 4 types of outputs on http://regex101.com/
And it is valid (with "i"). In my examples I check the "bytes=32" and not the time.

from node-red-nodes.

hardillb avatar hardillb commented on August 20, 2024

I think @dceejay means that the order of the fields changes with different languages so we can't extract the correct response time with just one regex

from node-red-nodes.

GermanBluefox avatar GermanBluefox commented on August 20, 2024

Sorry, I did not notice, that the response time was extracted. I just tried
to extract positive or negative answer.
Because for Home-Automation (where I am active) it is not important how
many milliseconds. it is important if the device ON or OFF.
Can we process that with 2 steps: first one extract Yes/No (res=true) and
the second (if Yes) the response time?

2014-11-06 13:39 GMT+01:00 Ben Hardill [email protected]:

I think @dceejay https://github.com/dceejay means that the order of the
fields changes with different languages so we can't extract the correct
response time with just one regex


Reply to this email directly or view it on GitHub
#80 (comment)
.

from node-red-nodes.

bigmonkeyboy avatar bigmonkeyboy commented on August 20, 2024

I think...

 
    =.*[<|=]([0-9]*).*TTL|ttl..*=([0-9]*)

may do the magic...
actually then needs to handle both m[1] and m[2] but hey...

from node-red-nodes.

dceejay avatar dceejay commented on August 20, 2024

Ping node now updated. @GermanBluefox can you check ? Comment ? Close ?

from node-red-nodes.

dceejay avatar dceejay commented on August 20, 2024

Closing as I think it's fixed. please re-open if not.

from node-red-nodes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.