# File lib/facter/ipaddress6.rb, line 26
def get_address_after_token(output, token, return_first=false)
  ip = nil

  String(output).scan(/#{token}\s?((?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/).each do |match|
    match = match.first
    unless match =~ /^fe80.*/ or match == "::1"
      ip = match
      break if return_first
    end
  end

  ip
end