- 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
Let’s say the following is our string. Some text is surrounded by special character hash(#) −
We need to replace the special character with valid values. For this, use replace() along with shift().
Following is the code −
To run the above program, you need to use the following command −
Here, my file name is demo298.js.
This will produce the following output on console −
- Fetch middle part of a string surrounded by slash in MySQL
- Replacing specific characters from a matched string in PHP regular expression where we don't know the number of instances of the match?
- How to remove all instances of a specific character from a column in MySQL?
- Replace tab characters by a fixed tabsize in a string array in Numpy
- Replace characters in a string in Arduino