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

learn more… | top users | synonyms (1)

0
votes
1answer
26 views

Need to replace text in clipboard based on a pattern

I have text like: 123*321 (* represents a wildcard) When I copy and paste it, I need to recognize the pattern (123 and 321), and replace the entire string with another. For example, I copy ...
0
votes
1answer
37 views

Delete “unidentified” carriage-return char from a text file

I have a text file containing a strange "carriage return" char. If I open the file with Notepad I can't see the new line. If I open the file with Wordpad I can see the new line. I uploaded an ...
1
vote
2answers
32 views

Replacing several strings in a file in one go

Suppose I want to replace all AAA with BBB and all BBB with AAA in a text file. The thing which looks an obvious solution (in Perl or in Sed) is: s/AAA/BBB/g; s/BBB/AAA/g; But this does not ...
2
votes
1answer
38 views

NotePad++ - How to remove or replace newline characters?

Within my notepad++ environment, I have the following value on a page... test me out </li> I can search and find the ending </li> value with.... \n</li> but what do I need to ...
0
votes
1answer
61 views

Multiline find and replace wrapper with wildcard inside

I'm trying to put a wrapper around a bunch of fields that already exist. I want to convert this: <div class="editor-label"> @Html.LabelFor(Function(model) model.FirstName) </div> ...
1
vote
1answer
28 views

How do you Find & Replace only in specific Styles in Word?

I have a document with sub-sections and text. The sub-titles for each sub-section starts with a number. I want to remove this number. I know searching for ^# and replacing with 'blank' removes all ...
1
vote
1answer
23 views

Linux bash, command replace

How can I erase the - from clipboard? I have a script: #!/bin/bash xclip -o | replace - "" | xclip Bat this doesn't work So replace \- "" take no effect ]$ uname -a Linux localhost.localdomain ...
0
votes
0answers
7 views

How to put a dollar symbol before every column and row number in google spreadsheet

I have a big spreadsheet in google docs with many formulas like this: =MIN(C3;C4)/500+4. Now we need to add $ before every cell row/column to make it absolute. So, the formula should look like this: ...
0
votes
1answer
717 views

Add new line after words matching a specific pattern

I'm trying to add a new line before and after a hyphenated word (one or many hyphens) in Notepad++ Input This is a search-and-replace test which I need-help to figure-out</h2> Output This ...
2
votes
1answer
54 views

Bug in Microsoft Word with Find and Replace when searching text containing a hyperlink?

I was trying to replace a text with a email address in the middle of it in a Word document. If I only use the Find command, then it works fine, and Microsoft Word finds the text I wanted to replace. ...
2
votes
2answers
26 views

Sed replace between 2 strings with special character

I have an XML file containing a code and to use it with xmllink I need to remove a link. XML file containing: <xml version="1.0" encoding="UTF-8" standalone="yes"?> <PackingList xmlns="Link ...
0
votes
1answer
253 views

Microsoft Word wildcards

I have a document that has the word "The" capitalised in many places it shouldn't be. I wish to change "The" in those cases, to "the". I need to change any instances of "The" that are not at the ...
0
votes
1answer
33 views

Search and replace option in notepad++ for making a dictionary

We've gotten several files from a professor who published his dictionary and we convinced him to make it open source and make it freely available online. So now I've ended up with several files with ...
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 ...
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 ...
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 ...
0
votes
0answers
36 views

How do I bulk replace a hyperlink containing a File:\\ command in excel

I work with Sharepoint 2007 and Excel 2007 In SharePoint I sometimes use a hyperlink with the file command like; (file://\\group.net.dk\sites\S01625\stt\Drawings). This is useful when I want to open ...
1
vote
1answer
72 views

Notepad++ replace .|every 5th line with .}

I got a text that ends on every single line with .| And I need to replace the .| on every 5th line with .}
2
votes
1answer
2k views

Multiple find and replace in a word document

I want to do a series of find and replace operations. Unfortunately, the documents I have to work on are in Word (.docx) format so I cannot script this. These are book chapters so formatting is ...
1
vote
0answers
27 views

How to find and replace lines in one file that match the pattern of lines in another file

I have a scenario with two documents. The first doc has lines of text, and the second doc also has same text with different text before and after this text. They need to be replaced. Doc 1 ...
0
votes
1answer
36 views

Notepad ++ Find word and replace line above and below

Here's my example : class Item478 { position[]={14186.376,18.035046,18340.531}; azimut=-134.41499; id=734; side="EMPTY"; vehicle="Land_LampStreet_F"; skill=0.60000002; ...
0
votes
1answer
53 views

Replace multiple strings in multiple files

I think the title speaks for itself. How can I replace multiple strings in multiple files? For example, I have the following strings: home.php, blog.php, forums.php, contact.php, etc. And I want ...
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 ...
2
votes
2answers
399 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
2answers
173 views

How can I replace around a wildcard in a regex search?

I'm trying to comment out all of the variable type declarations in a script I have, but I've run into this problem a few other times. I'd like to match a string, followed by a variable name, followed ...
0
votes
2answers
1k views

Adobe Brackets; How to use the replace regexp function?

I searched the Brackets user guide @github and couldn't find how can I use the the search and replace function inside of the program. A simple example is to find foo and replace it with bar in a ...
0
votes
5answers
328 views

On a Mac, how to rename all files ending with a question mark?

I have some files that are like: 123.mp3? I need to rename them to 123.mp3 How can I do this to all the files in a given folder? I'm on a Mac
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 ...
1
vote
1answer
95 views

Notepad++ replace every 3rd and 4th iteration

I'm using notepad++ I'm wondering if it's possible to replace every 3rd and 4th iteration in lines of HTML. The original code looks like: <div class="ui-bar ui-bar-d" <div class="ui-bar ...
1
vote
1answer
3k 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 ...
1
vote
1answer
983 views

How to replace a word with Regular Expression in Microsoft Word 2007?

How can I replace a word with Regular Expression in Microsoft Word 2007? For example, I want to find and replace all \n with some spaces.
1
vote
2answers
232 views

replace all names with an alternative using Stream editor (Sed)

I got this question on a task. Nothing works.. Can someone help me? Write a sed script that replace all names with an alternative, search for every words that: Start with a capital, Longer than ...
1
vote
1answer
2k views

Search & replace with wildcards and variable length strings in Notepad++

I am trying to edit a series of strings in Notepad++ using search & replace. What I'd like to do is to search for a particular piece of HTML code, then delete a portion of it. The challenging ...
1
vote
4answers
2k views

using sed to replace two patterns within a larger pattern

Using sed how could I replace two patterns within a larger pattern on a single line? Given a single line of text I want to find a pattern (Let's call this the outer pattern) and then within that ...
1
vote
1answer
275 views

How do I remove HTML from MS Word 2010 document with Find/Replace Wildcards/Regex?

I found a website to help me choose domain names. I have my shortlist which I can't export, but I need to share the list with some other team members first. It also won't let me copy and paste the ...
1
vote
1answer
231 views

How to find and replace in the bookmarked lines in notepad++

I have a problem about how to find and replace in the bookmarked lines in Notepad++. For example my line is <content:encode><em>.... So I bookmark the lines that have ...
1
vote
1answer
619 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 ...
1
vote
1answer
53 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 ...
0
votes
2answers
7k views

Excel macro: Replace enitre cell contents; replace 1 but not 10, 11, 21 etc

I need to replace a large amount of numbers with words in an Excel spreadsheet. Eg: 1 = hello 12 = goodbye 4 = cat etc. I can do it with the standard search and replace, but i have a large list to ...
0
votes
3answers
747 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 " ...
0
votes
1answer
29 views

Replace '-' char using sed

I have a text file, quite similar to this one: JACK BLACK 123456 -1245368 - BRIDGET RED 1245 548425 + JOHNNY HOMUSS 55482 -4325 - I wanted to use a sed command ...
0
votes
1answer
64 views

Mark all URLs ending with .se (Notepad++)

I got a massive document with text. I want to mark all the URLs ending with .se I managed to mark the part of the url just before .se with \w+\.se. But some of these URLs got 3-4 subdomains. So if I ...
0
votes
3answers
96 views

How do I exclude match and change only specific character with sed

I am trying to use sed to replace '0' with the word 'correct' (I am using echo $? to validate my script and I want to replace the output of echo). The problem is that I have more text in the output ...
0
votes
1answer
776 views

How to find and replace in the between tags in notepad++

I have a problem about find and replace in notepad++. I want to find a space+space in text and replace with just one space. But the area I want to find and replace is between tags (ex: ...
0
votes
1answer
24 views

How to replace a character from a variable location of a string up to the last character

Question, please: How do I remove characters starting with _ then all the way to the end. Examples are: FC1-46-SCD-02-008-11_14P will be FC1-46-SCD-02-008-11 FC1-46-SCD-02-0008-11D_0P will be ...
0
votes
0answers
78 views

Is On-The-Fly string replacement possible using GreaseMonkey and Firefox

I have looked for means to stop Brightcove videos from autostarting in Firefox and have come to the conclusion it isn't possible without external programming via something like Grease Monkey. However, ...
0
votes
1answer
75 views

Replacing subString in an array with bash

What I got: array[0]="Programm is Running" array[1]="programm is down" What I want: array[0]="Programm is \e[0;32mRunning\e[0m" array[1]="programm is \e[0;31mDown\e[0m" This will make things a ...
0
votes
1answer
31 views

grep and search and replace in linux accepting parameters with /

I'm trying to find and replace the contents of a file using grep and sed. grep "#!/bin/bash" ./ | sed xargs -i 's/#!/bin/bash/#!/usr/bin/env bash' How do I make sure that the string #!/bin/bash will ...
0
votes
1answer
381 views

Find and replace numbers in Excel?

I have a spreadsheet with @ 4000 cells containing a summation like (for example) =439+23+678+1 (Stock market data.) Each number in the formula could vary between 1 and 5 digits. I need to replace each ...
0
votes
0answers
41 views

How do I 'find' and 'replace across multiple documents

Is there a simple way to do a 'find' and 'replace' across multiple Word documents. Need the headers and footers also to be covered for the replacement. Have tried a VB macro from the web but it didn't ...