I have a string "perm=delete;search;update;view-shielded;roles=Admin;CustomerService"
and want to convert it as "perm=delete;search;update;view-shielded/roles=Admin;CustomerService"
.
I try regex but no luck. Please help me with regex.
Question posted in Javascript
A very good W3school tutorial can be found here.
A very good W3school tutorial can be found here.
2
Answers
You can use this one liner to seprate individual parts:
You could try a regex. Here you replace
;
followed by a word and=
: