Question and answer is powered by AnsPress.io
I want to remove special characters from string jquery.
If my string return that
my_string ="----------success";
then remove “————” this and only show the success from the string value.
How can I remove special characters from string jquery?
If you want to remove “————–” this sign from your string value then follow this example code:
<script type="text/javascript"> var return_result=res.replace(/[^a-z0-9s]/gi, '').replace(/[_s]/g, '-') </script>
Hope tit will be helpful for you.