Source table:
Dictionary table:
It is expected that the values in the source table will be replaced according to the dictionary table. The target result is as follows:
I tried to use the replace function, but it can only replace a single one.
(Note: Since other values are separated by commas, the dictionary table id can be 1~100, so it needs to be replaced with a regular expression, otherwise 12 will be split by id1 and 2. open)
Recursive function written by myself
Effect:
Source table
Dictionary table
Example:
The function needs to be optimized.