There is an example. Please note the `col2` returns not only 'main'. I need it to return only main and I need to put it in a where clause. I can't use ~ operator because I will need to do something like:
FROM test1 t1 JOIN another_view AS s WHERE s.full_path = substr(t1.full_path, char_pos '/file..' to get /filesuser/client/.../attachment/.../) || 'main'