how to print valid ipv6 address using python regexp | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how to print valid ipv6 address using python regexp

how to print valid ipv6 address using python regexp 2001:0db8::0001 2001:db8:a0b:12f0::1 2001:db8::1:1:1:1:1 

24th Apr 2017, 12:33 PM
Anurag Sharma
Anurag Sharma - avatar
5 Answers
+ 5
Could you please describe better what you seek to accomplish? Do you want to *find* ipv6 addresses, return them and then print? Are they all eight 16-bit blocks or may they be in the ommitted-zeroes format, too?
24th Apr 2017, 1:19 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 4
Oh man, I once saw that on github and the regex for that had some 1.5k characters. And the one that accepted all possible formats of ipv6 was even longer...
24th Apr 2017, 1:27 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
yes.i want to print ipv6 address ..yes they are mounted zero
24th Apr 2017, 1:21 PM
Anurag Sharma
Anurag Sharma - avatar
+ 1
I want to extract ipv6 address with valid rules
24th Apr 2017, 1:22 PM
Anurag Sharma
Anurag Sharma - avatar
0
any help
24th Apr 2017, 2:47 PM
Anurag Sharma
Anurag Sharma - avatar