I have multiple string where i want to split my string after first slash if it matches to specific pattern. But I am not finding way for it. I am using postgresql.
Split_column
PA067
PA089/GHC
PA001/FDCJ/988S
After PA---, there xan be 0 to n slashes. Now I am using,
case when split_column ilike '%PA%' then split_part(split_column, '/', 2)
But here I need all, irrespective of position like For PA001/FDCJ/988S --> FDCJ/988S