My UI is sending %20 for space
I need to replace %20 with space
The incoming data may be string or list
Below are the condition need to satisfied
My input are input Lets say my search bar is searching below pattern
ABC,%20CDE
Expected out ABC,CDE
ABC%20CDE
Expected out ABC CDE
ABC%20%20%20CDE
Expected out ABC CDE
[ABC,%20CDE]
Expected out [ABC,CDE]
ABC,%20%20%20
Expected out ABC
[ABC,%20%20%20]
Expected out [ABC]
[,%20%20%20CDE]
Expected out [CDE]
,%20%20%20CDE
Expected out CDE
My Code only satisfied one condition
string.replace('%20',' ')
I am searching with replace. If not regex also would help