postgres=# create table dcst55(id int generated always as identity primary key, link text);
CREATE TABLE
postgres=# copy dcst55 (link) from stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself, or an EOF signal.
>> text1
>> \\link1
>> text2
>> \\link2
>> \.
COPY 4
postgres=# select * from dcst55;
id | link
----+--------
1 | text1
2 | \link1
3 | text2
4 | \link2
(4 rows)
postgres=# select * from dcst55 where link ~ '^\\.*';
id | link
----+--------
2 | \link1
4 | \link2
(2 rows)
postgres=# select * from dcst55 where link !~ '^\\.*';
id | link
----+-------
1 | text1
3 | text2
(2 rows)
postgres=#