Find and Replace Multiple Lines of Code for whole directory
-
I’m currently working on an assignment and I need to replace multiple lines of code for the whole directory.
For example, I have a code as:<link rel="apple-touch-icon" sizes="180x180" href=""> <link rel="icon" type="image/png" sizes="32x32" href=""> <link rel="icon" type="image/png" sizes="16x16" href=""> <link rel="manifest" href="manifest.json">Now, I want to replace this code with blank. But I’m not able to do this in “Find in Files” menu as it only finds one line of code at a time and not multiple lines.
There are thousands of files that needs to be replaced. I tried a plugin but they dont have such feature to replace multiple line in directory (only allows current file).
Would really appreciate your help in this regard.
-
I was able to make it work.
Using \r \n and \t in extended search mode I was able to put entire code supposed to be replaced in single line and then did a replace in all files pretty easily. Yay!
-
@Karan-Mandya said in Find and Replace Multiple Lines of Code for whole directory:
I was able to make it work.
Using \r \n and \t in extended search mode I was able to put entire code supposed to be replaced in single line and then did a replace in all files pretty easily. Yay!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login