we are upgrading postgresql from 9.2 to 12.2 and observed that "regexp_split_to_table" functions is giving different output in 12.2 than 9.2.
This was intentional. You will need to rewrite your query - probably by moving the call to regexp_split_to_table to the FROM clause and leveraging the LATERAL feature.