Given a string like that:
"CSV;XML;ZIP"
I'm trying to make a regex to transform it to something like that:
".csv,.xml,.zip"
I tried this regex pattern : ([^;]*)(;|$) replace with: .\L$1,
but the result is : .csv,.xml,.zip,.,
I need my regex to satisfy :
- "CSV" -> ".csv"
- "CSV;XML;ZIP" -> ".csv,.xml,.zip"
I feel like I need to add something inside my regex which says: if it is the end of the string don't add ',' else do, but I don't know how to do it.