Operations that locate specific instances of conditions being met and replacing them.

learn more… | top users | synonyms (1)

23
votes
8answers
17k views

How to remove this symbol “^@” with vim?

I have some files that are corrupted with this symbol: ^@ It's not part of the string; it's not searchable. How do I substitute this symbol with nothing, or how do I delete this symbol? Here ...
21
votes
5answers
22k views

How can I do a recursive find and replace from the command line?

Using a shell like bash or zshell, how can I do a recursive 'find and replace'? In other words, I want to replace every occurrence of 'foo' with 'bar' in all files in this directory and its ...
19
votes
1answer
12k views

Search and replace with TAB character in Sublime Text 2

In Sublime Text 2, I want search and replace by the TAB character. I tried replacing with \t char but it's not working. How can I do it?
13
votes
1answer
4k views

vim delete all lines that do NOT contain a certain word

In vim I can delete all lines that contain the word "price" with this :g /price/d How can I delete all lines that do NOT contain the word "price"?
10
votes
3answers
12k views

Can I search and replace in a Notepad++ macro?

I'm trying to create a macro in Notepad++ that allows me to do a few standard Search & Replaces. I can get the macro to do everything (add lines, add characters) except search and replace. I ...
10
votes
1answer
6k views

How can I use newline with the Find-And-Replace in Visual Studio?

I've become rather fond of the "Find-And-Replace" function in Visual Studio. The function lets me replace phrases, words, symbols, or whatever you can type into the textbox on the screen. How can I ...
9
votes
2answers
11k views

How to find and replace the character “*” in excel

I am trying to find and replace the * (star, or shift+8) character in a bunch of formulas in Excel 2007. * of course matches the ENTIRE contents of the cell, which is not what I want. How do I ...
9
votes
3answers
3k views

Search and replace tool that can handle multiple files and subfolders [closed]

I'm looking for a tool which can search/replace within file contents for a broad range of file types (i.e. it should, if possible, process the maximum possible number of file types like .txt, .sql, ...
8
votes
5answers
21k views

How do I find and replace a character in filenames in Windows 7 using Explorer?

I want to replace all the underscore characters (_) with a space () in a filename. How can I do this quickly, when I have lots of _ characters to replace?
8
votes
5answers
17k views

Notepad++ Delete Lines with Find & Replace

Does anyone know how to delete a line using Find & Replace in Notepad++ ? In my Find query it finds the proper lines okay: ^.pPrev.$ In the Replace field, I leave it blank thinking the line ...
8
votes
3answers
6k views

Use Notepad++ to change under_score_case to CamelCase?

I can write a regular expression in NP++ to find under_score_case. I can use TextFX in NP++ to change case to upper and lower case by highlighting and selecting. How can I use either NP++'s ...
7
votes
1answer
15k views

Find and replace in Notepad++ using wildcards/regex

I have a SQL dump with expressions such as youtubehd:2nj6bykw. The 2nj6bykw can also be a different random string. It is always 8 characters long. I want to replace youtubehd:2nj6bykw with just ...
6
votes
4answers
18k views

Find and replace multiple blank lines

How do I use the find and replace function in notepad to delete multiple blank lines in a text file?
6
votes
2answers
14k views

Replace newline character with another in Word 2007

Using Microsoft Word 2007, is it possible to replace the newline character (\n) with some other character? What about vice versa? (That is replace a character with the newline character).
6
votes
6answers
19k views

How can I search and replace in multiple Word files?

I am looking for a way to do search and replace in many Word (.doc) files (for the purpose of automation of the process). The software I found so far only allows me to search, but not replace. How ...
5
votes
2answers
2k views

how to do a vim search inverse search for all lines with out text

with grep I can do a grep -v "my search" to get all the lines with out "my search" with sed I can sed '/baz/!s/foo/bar/g' to find replace text on lines with out baz Is there a way to do the same ...
5
votes
1answer
312 views

How can I insert a page break using Find/Replace dialog in Word 2007?

I'm trying to replace "----------" with a new page or a CTRL+enter keyboard shortcut. I pasted "CTRL+ENTER" into the "Replace With:" field in Microsoft Word 2007, hoping that when I clicked "Replace ...
5
votes
2answers
750 views

Emacs Evil search and replace function

Emacs has a Vim emulator mode called Evil. This mode has a search-replace function that does basically the same thing as highlighting a region and running sed on it. The brilliant thing about this ...
4
votes
6answers
11k views

Regex Replace from Command line

Is it possible to regex replace from command line? Right now I'm using notepad++ to do this. In command line I can only use FINDSTR wich can only locate the mached files/lines EDIT : Maybe it will be ...
4
votes
4answers
2k views

Is it possible to edit a PDF file directly?

I have a PDF file that is produced as part of a help file compilation. There is always late breaking stuff which goes into a text file (e.g. "What's new in this version" type of stuff) and while Help ...
4
votes
3answers
5k views

How to find and replace link paths in multiple Excel files at once

We have a huge folder containing office documents on our server. IT wants to change the name of the folder from Mehper_repository to Planning_reports. Since most of the Excel files in the subfolders ...
4
votes
2answers
484 views

shell script to replace a keyword in a file with the contents of another file

I'm to create a .sh to replace a specific keyword in a file using the contents of an other file. template.html contains a unique string "PLACEHOLDER" it must be replaced with the contents of file ...
4
votes
2answers
1k views

sed: replace first occurance of a string in every line

Imagine I have a file like this: INSERT INTO table VALUES('1','<p><em>The lazy fox jumps again</em></p>bunch of other html<p><em>Is the lazy fox ...
4
votes
4answers
2k views

What's the best way to find and replace text in multiple files over FTP?

How can you search and replace text in multiple files on an FTP server? Basically I need to change the Google Analytics information on a bunch of plain old HTML pages and I'm wondering if there is a ...
4
votes
1answer
457 views

ms excel find and replace @ symbol results in broken formula

I'm trying to search and replace in excel, the column is formatted as 'Text'. Find: [@ replace with: @ Whenever this finds a match at the start of a cell i.e the cell contents start with [@ and ...
4
votes
2answers
4k views

Replacing all special/accented characters with equivalent regular characters in Notepad++

I'm trying to figure out a way to automatically search and replace all special/accented letters/characters (such as Â/Ô) with the equivalent regular letters/characters (A/O) in Notepad++. Tried using ...
4
votes
1answer
448 views

How to do a search-and-replace in Opera for textarea context?

How do I do a search-and-replace in Opera for a textarea's context? I have a web page with html form and I need to input and edit large text in this form. Easy example: Stay on this page, scroll ...
3
votes
4answers
3k views

Excel Smart Find and Replace only specific characters

I want to change INT to INTERNATIONAL and NA to NATIONAL ASSEMBLY in whole excel workbook through an excel Macro or Find and Replace dialogue box. But when I run the macro or change it through Find ...
3
votes
1answer
456 views

Linux: Find all occurrences of “string1” in files under a directory and replace them with “string2”

In linux, what's a good way to find all occurrences of "string1" in files under a directory and replace them with "string2"?
3
votes
2answers
2k views

Multiple search and replace actions in one large text file

I have a big text file (about 2GB). I want to do five search and replace actions on the same file, and would like to do this in one command. Normally I use vim, open the file, do one replace action, ...
3
votes
3answers
1k views

Substituting a multi-line pattern in an HTML file

I have a series of HTML files that contain two lines like this: <body> <h1>Title</h1><p> <a href="url">Description</a><br> I want to replace this text with ...
3
votes
2answers
224 views

How to format a string substitute, or a text line, in Vim?

Is it possible to format the replacement string when substituting a match with Vim? Say I have a file with a 2-column table, where the entries in each row are separated with a space. The entries (and ...
3
votes
2answers
35 views

How to insert a recent search pattern to use for search-and-replace in vim?

I've entered some search pattern in vim using / command. Now, I want to replace those occurrences I've found with something else. How do I easily insert the recently used search pattern into the :%s/ ...
3
votes
2answers
319 views

Append lines one after another in notepad++

How do we achieve the following using replace function in notepad++? Transforming the following cow horse elephant camel into 'cow','horse','elephant','camel' I know ^ and $ (under Regular ...
3
votes
1answer
377 views

Can I delete any line with a given search string?

In Vim, I'd like to search for lines with a given string, then delete them. Specifically, I'd like to find lines with the LaTeX commands \begin{frame} and \end{frame}, and delete them. =
3
votes
2answers
5k views

How to search & replace within a cell value?

I have a cell A and its value is 122abb12. In another cell B, I want its value to be the value in cell B but all 1 should be replaced by I - value in cell B should be I22abbI2. What is the function ...
3
votes
1answer
4k views

Delete all text before and after a certain string

I have some URL like the following http://www.SOMEURL.com/first-category/1343381-example-text-text-text-text-2000-a.html What I want is to simple delete all of the text before and after the number ...
3
votes
2answers
4k views

Notepad++ find and replace expression help

I want to find all content between two characters, say A and B: Asd;lfksjd;fsdfjs;ldfkB which would be sd;lfksjd;fsdfjs;ldfk and replace them. How would I write this expression?
3
votes
1answer
355 views

Saving part of found term when replacing in Notepad++

I want to use Notepad++ to find/replace large chunks of code, but a hefty part of it deals with arrays. How can I put a "variable" in Notepad++'s Find/Replace window so that part of it can be saved ...
3
votes
2answers
2k views

Using search and replace to remove line breaks in Open Office

I've imported a document into Open Office and it has a number of hard returns in wrong places. In MS Word, I could use the search and replace to simply get rid of them all easily, but Open Office's ...
3
votes
2answers
575 views

Microsoft Project 2003 - How to do a “find” in non-expanded nodes?

I am using Microsoft Project 2003 find command. When I choose ctrl+f and type a string to search for, MS Project only appears to search tree nodes that are expanded. Is there a way to get MS Project ...
3
votes
1answer
277 views

Find Replace - Args out of range?

Using: GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-03-25 on allspice, modified by Debian I am trying to do some simple find and replace. Not a big deal. I'm not even using ...
3
votes
1answer
509 views

Something that can search and replace a hex string but for multiple files?

Hi I'm looking for a hex editor kind of thing but for multiple files? Can Windows Grep do this or does it only handle text strings?
2
votes
7answers
13k views

Find and Replace several several different values all at once

I have a file with multiple instances of Text_1 and Text1 and I need to replace both those strings with Text_A and TextB respectively. Currently I'm doing two Find and Replace functions on each ...
2
votes
2answers
2k views

How to replace one line to two lines or more on a text file using the “find and replace mode”?

Right now I'm developing a script with vbscript and I need to find one specific line(with a lot of occurrences) on a 5k lines source code and replace it to two new code lines(1 line to 2 lines ...
2
votes
2answers
1k views

Textmate: regular expression to replace matches preserving case?

How can I use a single search / replace to replace all words town with village preserving the case of the first letter in this sentence: Towns are small cities. I live in a town.
2
votes
2answers
259 views

Remove colons (:) from illustration index in Microsoft Word 2010?

How can I remove all the : from illustration index in Word 2010? FIG. 2.4: Representação em RDF/XML da FIG. 2.3 27 FIG. 2.5: Ilustração da Utilização do RDF com o RDFS 28 But I need this: FIG. ...
2
votes
2answers
2k views

How to replace a specific character between specific words?

Would you be able to help me in finding out how I can use the Notepad++ Find/Replace function to replace a specific character between specific words. Please see the example below, I would like to find ...
2
votes
2answers
394 views

Replace a regular expression within vim with an output produced by a console command with the expression as its argument?

let's say I have a file with the following content: This is a _file_ which has some _special_ keywords, that I would _like_ to replace. I can do a search and replace of the speical keywords ...
2
votes
4answers
1k views

Extracting text from a cell in Excel

I have a long list of items in Column A that includes a code and descriptive text. I need to separate the code from the text description. <ABC,1122, A1> - This is the text description The ...