If I may translate: the German parts into English:
Net::HTTP.get_response(URI.parse(‘http://www.whatismyip.com’)).body.scan(/^Your
WAN IP is.+/) { |ipadresse| puts
ipadresse.sub(/^.+">/,‘’).sub(/<.+$/,‘’) }
The one liner resolves your external IP with the help of an external
service.
A hint for mrpink: German is not widely spoken beyond Germany, Austria
and Swiss, so it’s a good idea to translate your output.
lol my output prints a plain IP-adress on the screen and nothing else
and you’re code is of course not working because you conducted my
regular expression with an output string muahhh
Interesting. I expected my code to be equivalent, but it gives a
Net::HTTP.get_response(URI.parse(‘http:// www.whatismyip.com’)).body.scan(/^Your WAN IP is.+/) { |ipadresse|
puts ipadresse.sub(/^.+">/,‘’).sub(/<.+$/,‘’) }
The one liner resolves your external IP with the help of an
external service.
A hint for mrpink: German is not widely spoken beyond Germany,
Austria and Swiss, so it’s a good idea to translate your output.
Wow, I am dumb today. Thanks for helping me to actually read the
email I responded to.