I am trying to replace '&' and 'space' from a string.
I can remove the space by string.replace(/[\s]/g, '');
and remove the special character & by string.replace(/[^\da-zA-Z]/g, '')
Can I use both regex in one code? for removing special charecters and space from the string.
&...encodeURIComponent()