Regular expression for ipv4 and ipv6?

https://regex101.com/r/5cBm5a/1/

This regular expression is validation for ipv4 and for ipv6.

Here is an example of data that passes this regular season.
2001:db8:abcd:0012:0000:0000:0000:0000

0000:0000:2001:DB8:ABCD:12::

255.255.255.0

But the regular season does not pass validation for the address where such prefix is used.
For example, here

2001:db8:abcd:0012::0/112
How to add a possibility to enter a prefix?
June 7th 19 at 14:53
0 answer

Find more questions by tags JavaScriptRegular expressions