I’m receiving data in this form
('FCA',)
('JP NIC',)
('JP CHI',)
('2022-03-04T07:18:36.468Z',)
I want to clean up to remove Brackets, string quote and comma
FCA
JP NIC
JP CHI
2022-03-04T07:18:36.468Z
I’m trying to use substring() But problem is number of characters in this data can be changed but these value are constant and I want to remove them ('',). How I can do this ?
>Solution :
you can use regex and string.replace
string.replace(/[|&;$%@"<>()+,]/g, "");
just put whatever string you want to ignore inside the rectangular brackets, i.e – string.replace(/[YOUR_IGNORED_CHARACTERS]/g, "")
you can read more about regex here