# File lib/facter/ipaddress6.rb, line 24 24: def get_address_after_token(output, token, return_first=false) 25: ip = nil 26: 27: output.scan(/#{token} ((?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/).each do |match| 28: match = match.first 29: unless match =~ /fe80.*/ or match == "::1" 30: ip = match 31: break if return_first 32: end 33: end 34: 35: ip 36: end