IPv4 and IPv6

Hi,

Scenario:
The input i'm receiving in Logstash is sometimes IPv4 and sometimes IPv6, on the same column.
It differs sometimes from time to time.

Right now, I have an IPv4 GROK pattern.
Problem:
When an IPv6 address passes by, I get this error:

How can I make the GROK pattern valid for IPv4 and IPv6?