Postgres text column too large for an index - searching for IP address, so I don't think text search will work
You need a function which extracts the IP addresses into an array.  The regexp you gave doesn't work for me, so I came up with my own crude one, you will probably want to tweak it to suit yourself:

create or replace function extract_ip(text) returns text[] immutable language SQL as $$
  select array_agg(x[1]) from regexp_matches($1,'\d+.\d+.\d+.\d+','g')f(x) 
 $$;
create index on foobar using gin (extract_ip(value));
select * from foobar where extract_ip(value) &amp;&amp; ARRAY['192.168.2.1'];