regexp_split_to_array(/srv/progs/programs/Aliens/The_Aliens_1_ens_envsc2_envsc2.mp4,'('/|\.)'), which splits on either / or . to extract fileparts
It would be useful to be able to have the array returned reversed, so rather than having to use cardinality(array)-1 I have a reversed array and say arr[1]
Also it seems impossible to get a reverse slice (returns null array)
you can use own simple function
create or replace function array_rvrs(anyarray)
returns anyarray as $$
select array(select unnest from unnest($1) with ordinality order by ordinality desc)