Tag: String
Linux – Replace String in Files
We often come across a requirement to replace a string in a set of files. If we are using a windows environment, then doing it would be easy. Linux also provides some commands to search for a string in a file and replace all of them at once. We will look at multiple options that …
How to Find Files containing a string in Linux?
In this article, we will discuss a way to find files containing a specific string in Linux. Using find and grep command Suppose you are using a Command Line Terminal in Linux, and you need to find the files which contains specific text. You can use the find command along with the grep command to …
Javascript: Remove First and Last Character from String
This article will remove leading and trailing characters from a javascript string using different methods and example illustrations. While developing in any language, removing the first and last characters from the string is common before processing it, as it might be an address or URL. We will discuss both cases: if the character is known …
Javascript: Remove First and Last Character from StringRead More
Javascript: Remove Parenthesis from String
This article will remove all brackets from a javascript string using different methods and example illustrations. While developing in any language, removing the parenthesis from a string is common before processing it. We will also discuss removing square brackets and other brackets in this article. Table of Contents:- Javascript String Remove Parenthesis using replace() Javascript …
JavaScript Remove Zeros from a String
This article will remove all zeros from a javascript string using different methods and example illustrations. While developing in any language, removing zeros from a string is common before processing it. Here, we will discuss removing leading zeros, trailing zeros, and other zeros within the string. We will be using replace() and replaceAll() methods of …
JavaScript Remove Hyphens from a String
This article will remove all dashes (‘-‘) from a javascript string using different methods and example illustrations. While developing in any language, removing dashes or hyphens from a string is common before processing it, as it might be a phone number, for example. Table of Contents:- Javascript String Remove Hyphens using replace() Javascript String Remove …