- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
The syntax is as follows −
Following is the code −
var values = '&677,431,444,98777'; var result=values.replace(/(^\&)|,/g, ''); console.log(result);
To run the above program, you need to use the below command −
Here, my file name is demo319.js.
This will produce the following output −
- How to escape all special characters for regex in Python?
- MySQL query to replace special characters from column value
- Special Characters in HTML
- How to match word characters using Java RegEx?
- How to match the regex meta characters in java as literal characters.
- How to use special characters in Python Regular Expression?
- How to count special characters in an R vector?
- How to use Unicode and Special Characters in Tkinter?
- How to replace characters on String in Java?
- How to Replace characters in a Golang string?