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

learn more… | top users | synonyms (1)

0
votes
1answer
565 views

Multi-line find and replace across multiple files on linux

I have: Old Google analytics tracking code oldcode.txt New Google analytics tracking code newcode.txt 100+ html files *.html in one directory Is it possible to replace former with latter in all ...
2
votes
2answers
348 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 ...
1
vote
1answer
565 views

batch script help, find, replace registry keys

I'm trying to figure out why my reg import command is not working in the script below. When I run the reg import fileName.reg from the DOS it works fine but when included in the script below it does ...
0
votes
1answer
90 views

How to find and replace number as text?

I have a column with the following content: Column --------- 01.6221 01.6222 01.6223 I need to replace all the "01" with "10", but for some reason when I do the replace, the dot disappears. ...
0
votes
1answer
106 views

Find and replace special characters

How can I replace this character (_) with this one (:) in a list of filenames? The filenames are like this: 1_0_1_1AE1_7F6_2_11A0000_0_0_0.png The problem with character replacement programs is that ...
1
vote
0answers
112 views

sed without regex

I am using GNU SED for find and replace functionality on large files(upto 2GB). Find and replace characters can contain any characters, hence I want find and replace parameters to be treated as plain ...
0
votes
2answers
204 views

Selecting all css properties with brackets to erase them

How would one search, within a CSS file and using Komodo Edit, everything inside and including the brackets from every CSS style rule. I need to end up with a list of CSS classes and IDs erasing all ...
1
vote
0answers
60 views

Find-And-Replace Any Selected Text

Goal: Quick find-and-replace for active selected text in any application. Description: I want a utility to quickly perform a predetermined find-and-replace for the current selected text in the active ...
1
vote
2answers
140 views

Delete first half of line in Notepad++

I think the following can be done in a search & replace function. How can I select until yahoo.com: overjoyedradica@yahoo.com:SQOVTJOHEN and turn it to: :SQOVTJOHEN
1
vote
4answers
151 views

Search and Replace string in Vim

I have code similar to this: $POST_['%'] where % is any length any letter+numbers string and I want to replace it with mysql_real_escape_string($POST['%']) so far I have built up this command ...
1
vote
1answer
51 views

Automatic replacement of expressions

Maybe this can be achieved through (extended) regular expressions, but I really don't know if or how. There seems to be a way to access "things that are found" by using $1, $2, … but I have no idea ...
1
vote
1answer
9k views

Find and replace using wildcard character in Notepad++

I have very long list in this format: <option value="adf">Option 1</option> <option value="es3">Option 2</option> <option value="34f">Option 3</option> With ...
0
votes
1answer
705 views

Regular Expression to replace part of URL in XML file

I need a regular expression in Notepad++ to search/replace a string. My document (xml) has serveral thousand lines that look similar to this: <Url ...
0
votes
1answer
2k views

Find and replace a word in one Excel file accross multiple sheets

How do I find and replace a word in one Excel file across multiple worksheets in the same file?
1
vote
1answer
145 views

Using PowerShell to replace individual bytes in a document

We're in the process of converting an HTML help system to a SharePoint document library. We have about 3000 individual HTML documents that we're converting to Word. About 20% of the documents include ...
0
votes
3answers
715 views

AppleScript: how do I store folders' pathnames into an array, replacing spaces with “\ ”?

I have a folder and inside this folder there's a bunch of subfolders. Using AppleScript I wish to store the pathnames of these subfolders into an array. Here's my problem: each pathname containing " ...
1
vote
1answer
866 views

Delete specific number of characters after a specific string is found

I have several lines of code and I'm looking for a way to search for a specific string e.g. 'id0=' and delete it and all 10 characters after it, per line. I would prefer a way/macro/addon for ...
1
vote
1answer
885 views

Search and replace registry entry value using powershell

I'm trying to update a set of registry keys, a set of properties need to be updated with a new value based on the old value. I tried using the following: Get-ItemProperty -Path ...
1
vote
2answers
512 views

Regular expression to replace in TextPad

I need to replace this: HSOD,BASE,DFLT,001,06-19-2012,[any string],1,0,0 With this: HSOD,BASE,DFLT,001,06-19-2012,[any string],1,0,N where the [any string] part needs to be a wild card.
0
votes
2answers
785 views

Remove lines not containing a word in Vim

In Vim I often find I'm only interested in lines containing a certain string of text and want to delete all other lines. It's easy to match lines containing a string: :s/^.*foo.*\n// What I ...
0
votes
1answer
222 views

How to find and replace special formats in word processors?

Currently I have Word 2010 and Word 2013 Preview (and OpenOffice 3, LibreOffice + LyX 2) installed. And I want to do this: I have long document full of content that is sadly broken down by ...
5
votes
2answers
708 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 ...
1
vote
0answers
281 views

Is there a Sublime Text 2 equivalent to Dreamweaver's “Find and Replace > Search: Specific Tag” feature?

Is there a function within Sublime Text 2 or a plugin similar to this (besides regex)? In this example, I wanted set the attribute border to 0 for every img tag in the document. Or, say, I wanted ...
1
vote
1answer
191 views

Convert Text into a Formula in Calc

I have a bunch of cells in a spreadsheet like the following: 1.48oz/12 I am trying to replace the oz/ with * and then calculate it. So far I have: =REPLACE(G4,FIND("oz/",G4),3,"*") which yields: ...
0
votes
1answer
533 views

Natively Find & Replace with wildcards in Excel

Is there a way to natively use wildcards in Find & Replace, in Excel 2010? I'd rather not install an add-on if it can be avoided. For example: I want to be able to use a syntax similar to the ...
1
vote
0answers
38 views

how to search and replace a 1000 character long string in ubuntu [duplicate]

Possible Duplicate: How can I do a recursive find and replace from the command line? one of our sites got hacked with a base64 hash that is about 1000 characters long. How can i search and ...
0
votes
2answers
503 views

Find and replace slashes with new linfeed in Excel 2010

Can anyone tell me how to replace a slash (/) with a linefeed in Excel 2010? I have a very long worksheet with words, origins, and definitions. In the origins column, some rows show multiple places ...
4
votes
1answer
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 ...
0
votes
3answers
129 views

how do i turn a whole file into uppercase?

I have a file on a server on another campus that's all in lowercase that i need to changed to all uppercase. Is there any simple unix command that will do this? [i'm using PuTTy on a PC if that makes ...
0
votes
1answer
551 views

Replacing a certain string after a certain character in Excel

I'm organizing my Mame files in a way that all the games marked with mature (meaning adult content) are filtered out. I have a text file in Excel (one game per line) and I'd like to accomplish the ...
1
vote
2answers
1k views

How to “demote” all titles and headings in Word 2010?

I built a large help document for an application I wrote. I used all the default styles in Word 2010, including "Title", "Heading 1", "Heading 2", etc. Sadly, when I generated the Table of Contents, ...
0
votes
1answer
47 views

Select different parts of an line

I'm new to regexes and have a file that looks like this one: |60|493,93|1,6500| |60|95,72|1,6500| |60|43,88|1,6500| |60|972,46|1,6500| I used the regex (\|60|.*)(1,65) and I was able to find all ...
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 ...
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 ...
1
vote
1answer
2k views

Replace text when in visual-block mode

Maybe I'm searching the wrong way, but I've failed to find out how to do this. Here's the scenario: I have a list in a text file where I want to insert the same word on multiple lines, here's an ...
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/ ...
0
votes
1answer
75 views

How to convert part of file to lowercase?

Using gVIM on XP How can I convert the left side of this file to lowercase while keeping right side unchanged? %s/**what goes here?**/g CONVERTTOLOWERCASE###Keep CaSe AAAA###AeiOu BBBB###qWerTy ...
3
votes
1answer
260 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 ...
1
vote
1answer
306 views

Prevent inadvertent replacement in notepad++

Is there a way to make Notepad++ to ask for confirmation when replacing all instances of a string in a file or files? This is to prevent inadvertent replacement.
2
votes
1answer
2k views

How can I search and replace in Firefox?

I am moderator on a site with lots of structured content and regularly edit posts for poor formatting (in particular Markdown and LaTeX). Many of those tasks are tedious and could easily be performed ...
2
votes
2answers
328 views

Regular Expression Help Needed in Notepad++

I need to know the syntax for a regular expression (notepad++) to help me find/replace every instance of following string in a text document the string is as follows Where do you want to go next? ...
1
vote
0answers
472 views

Sublime Text 2 search and replace multiple words

I want to replace multiple words using regex in just one search accross all files. Something like this: Find: (dyspnea)|(jugular_swelling) Replace: (dispnea)|(turgencia_jugular) And this would ...
1
vote
1answer
734 views

Change font of all Hebrew text

I need to use different fonts for English and Hebrew in the same document. How can I change the font of all the Hebrew text, possibly using Find-and-Replace?
2
votes
0answers
136 views

How can I add non-breaking space (&nbsp;) in dates using search and replace in DreamWeaver

Example: January 1, 2012 This is the current text, but I want to change the source code to: January&nbsp;1&nbsp;2012 automatically using search and replace. There are multiple dates ...
2
votes
3answers
103 views

using vims pattern-multi-items {n} to match the 5th space in a line

With this entry from our crontab 1 3 1 * * find /var/log/tomcat/* -mtime +61 -type f -delete I want to match the 5th space char so I can separate the command part from the time field part. Cron ...
0
votes
1answer
637 views

How can I find and replace multiple blocks of text in multiple documents all at once?

I tried searching for this everywhere but couldn't find any solution. I have 100 html pages with various text to translate. I have also the translated text ready on a word document. So what I have to ...
0
votes
2answers
78 views

Search and replace text and everything that follows in the same line

How can I search for a certain string in multiple files (with a given extension) in a directory and replace everything afterwards (including the search string) with a blank string? Example I'm ...
18
votes
5answers
20k 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 ...
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 ...
0
votes
1answer
452 views

Using RegEX To Prefix And Append In Notepad++

I found this question on StackOverflow. It worked great but I also need to include lines that have non-alphabet characters in it like: some_name some.name And add prefixes like this: ...