Skip to main content

Questions tagged [find-and-replace]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
86 views

Using VS Find & Replace Regex across lines

I have multiple instances of code that looks like... if (condition) { statements } else if (different condition) { statements } ad nauseum (probably, honestly about 100+ different times, and ...
Musical Coder's user avatar
0 votes
1 answer
68 views

How to find and replace superscripted Numbers wrapped in square brackets in Microsoft word

I need to find all superscripted numbers wrapped in the square brackets like this [23] for example but for any number up to 90. Because I cited some references like [1] down to [90] but now I need to ...
Susan's user avatar
  • 1
-1 votes
1 answer
70 views

Search and replace doesn't work with sed busybox. getting sed: unmatched '/' error

I am trying to search a particular string and replace all occurrences within a file. sed -i -e "s/$search_string/$replace_string/g" $filePath I keep getting sed: unmatched '/'error on ...
aelor's user avatar
  • 99
0 votes
1 answer
267 views

Regular expressions to replace text strings in a MS Word document

I have the following protocol names like GR232 or GR485 and I am looking to replace them with the expression "GR" followed by a hyphen and the appropriate three digit number, something like ...
Camila Sanchez's user avatar
0 votes
1 answer
153 views

Adding specific text to any bold text in Word file

Can you help me how to add word " (correct)" after every bold word, in MS Word? For example, if I have the following text: This is my example text. how do I convert it to: This is my ...
user198003's user avatar
-1 votes
1 answer
29 views

Notepad++ How can I delete the return before the &

I want to remove a new line created right before an & SAMPLE TEXT: "Bachelor of Science in Nursing & RN" "Bachelor of Science in Nursing & RN" "Bachelor of ...
Cecil's user avatar
  • 1
0 votes
1 answer
91 views

Replace with wildcards in Excel or batch edit some wrapping formula

I'm only trying to delete some CONCATENATE() function from some formulas in Excel. What I have; here 'Something' could be a lot of things (digits, <, >, texts, etc… CONCATENATE("Something = ...
Seba99's user avatar
  • 101
1 vote
0 answers
93 views

Replace ** to NULL in Excel

I have excel which contain ** as value along with other values across between Rows and Column. I'm trying to replace ** with NULL but using Find & Replace it's Replacing everything as it's taking *...
pkd's user avatar
  • 145
0 votes
1 answer
106 views

RegEx in Microsoft Word Find/Replace to locate an unescaped semi-colon in index markers

I've got Find/Replace open, under More I have Use wildcards checked. I have a LOT of index markers in my document, and I want to find semicolons inside the index markers that are NOT escaped. I want ...
Christie Ward's user avatar
1 vote
1 answer
125 views

In Track Changes mode, Find is finding matches including in text which has been "deleted"

NB this is Word 2007. So hopefully the question is fairly self-explanatory. I'm editing a document with Track Changes on, but I'm hoping to do quite a lot of Find-and-Replace. However, these efforts ...
mike rodent's user avatar
1 vote
1 answer
414 views

LibreOffice Calc Basic search and replace macro

I am attempting to create a LibreOffice Basic macro for use in Calc that when invoked in an open spreadsheet file will open a second spreadsheet file that contains two ranges, (the first range ...
JCB's user avatar
  • 173
0 votes
2 answers
164 views

Inserting a tab before every word in bold in a long piece of text

I have a long vocabulary list in an MS Word document, with English words in non-bold, followed by Hungarian words in bold. I am trying to format it for use in the Anki flashcards software, and need to ...
Wiglaf's user avatar
  • 3
0 votes
1 answer
127 views

How can I remove a fix substring from a UNIX/Linux output?

My question looks ridicilously simple, but: I would like to remove an entire string, not a list of characters, so I can't use tr. I don't know the position of my substring, so I can't use cut. I'm ...
Dominique's user avatar
  • 2,259
1 vote
2 answers
380 views

How to find all lines with a certain style and add a character at the beginning of that line?

In a Word document, I have lots of song titles and all are formatted with the same style. Aside from the song titles, no other content in the document is formatted with this certain style. The song ...
Sylvia's user avatar
  • 137
0 votes
1 answer
174 views

How to replace a specific character using Visio find and replace

Using Visio 2016. I want to do a page-scoped find and replace to renumber a bunch of part labels from, e.g., 301, 302, 303, ... to 401, 402, 403, ... The Visio find and replace includes a wildcard ...
jordanpg's user avatar
  • 135
-1 votes
3 answers
1k views

Notepad++ find and replace using wild card

I have this very long file with many lines like this: MeshFile=brosm05028.gmt CollTarget=True HATTarget=True LODOut=(500.0) What I am trying to do is to use notepad++ find and replace to set the ...
Some Random Bozo's user avatar
1 vote
1 answer
150 views

How to copy up to a particular character (including that character) in every line using Notepad++

I have a text file with about 10000 lines of text. The text file is in JSON format. I want to cut (& keep in clipboard) the data found after the ':' colon symbol. { "Cust_Data": { "...
Hodler's user avatar
  • 13
1 vote
0 answers
74 views

how to find the undesirable formatting in a presentation/slides such as bold or Symbol font

My manager told me he think in some places of my presentation file he noticed inappropriate formats such as bold and Symbol font. Is there an easy way, preferably free like in free beer way to search ...
Serge's user avatar
  • 156
-1 votes
1 answer
138 views

Microsoft Word Find/Replace: How to replace brackets surrounding numbers with HTML superscript tags?

I am trying to figure out how to do two related actions using find and replace in Microsoft Word: Replace numbers surrounded by brackets with those same numbers surrounded by superscript HTML tags. ...
AMRhone's user avatar
0 votes
2 answers
177 views

Notepad++ 1) Seperate numbers into blocks of 5 2) Add a hyphen after 5 characters and 3) replace specific numbers with x's [closed]

I have a three-part question about using Notepad++ to alter sets of numbers. I have blocks of numbers as follows: 1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 5923078164 ...
Robert's user avatar
  • 11
0 votes
2 answers
113 views

Notepad++ How to replace every 11th character (25 characters per line) with a #

I have a set of data - 25 characters long per line by a couple of hundred lines. Each line / set of 25 characters per line consists of Numbers and Letters (both upper and lowercase) I want to replace ...
Robert's user avatar
  • 11
2 votes
1 answer
992 views

How to make all files in any folder in Windows sorted by date created?

When I sort files in folders I normally do it by name or by date created. My problem is that in Windows 7, 8, 10, 11, date created is not a native sort criteria and it has to specially be turned on ...
alhemister's user avatar
1 vote
1 answer
66 views

Incrementing of value not working inside "find"

I have a bash file that does a global update to files with a given name. I have used this script for several decades without any problems. I became curious as to how many files were being updated and ...
jwzumwalt's user avatar
  • 285
0 votes
1 answer
662 views

Word Find/Replace Add Tab at the Beginning of Paragraphs

I'd like to add a tab before each line of my Word document. Each line is a paragraph anyway so this may be easy to do. More, some lines have a digit or two and would be nice to have an extra tab after ...
Ioannis's user avatar
0 votes
0 answers
270 views

Replace special characters and numbers from columns Notepad++

I need to find/replace all special characters and numbers from 2 columns in Notepad++ with a space. Is there a way to list several special characters and numbers in the "find what" bar? ...
Cassandra's user avatar
3 votes
3 answers
574 views

How do I delete every ocurrence of a word that is followed by another, without altering the whitespace?

Suppose my file looks like this: foo bar foo bar bar foo foo bar foo What I want to do is delete every foo that is followed by a bar (i.e. there is only whitespace between them), without ...
vim_overlord's user avatar
1 vote
1 answer
145 views

How do I replace a specific character in a .srt file in Notepad++, if there are multiple occurrances of it and I want to leave the rest untouched?

I have multiple .srt files that were generated in a way they are not recognized by the video player as their text formatting is different. Original: 00:00:01:02 --> 00:00:04:16 What I need: 00:00:...
Erwin Dirks's user avatar
0 votes
1 answer
100 views

Change to Italic only one symbol in MS Word

I need to find all "ΔE" and change only "E" symbol to italic. How can it be done by find and replace, because it make both ΔE italic? Off course it can be done by changing all &...
XuMuK's user avatar
  • 318
0 votes
1 answer
2k views

Does Microsoft word have wildcards for return (\r) & new line (\n) like Grep or Regex do?

I frequently want to replace multiple consecutive return characters in written documents with a single return character and to use paragraph space (space after) to do the formatting. Sometimes there ...
wide_eyed_pupil's user avatar
1 vote
2 answers
700 views

Find text between parentheses and delete rest

I have paragraphs like this: (قَوْلُهُ: وَمَسْحُ الرَّأْسِ) إنَّمَا أَخَّرَهُ؛ لِأَنَّهُ مَمْسُوحٌ وَالْأَعْضَاءُ مَغْسُولَةٌ فَلَمَّا كَانَتْ مُتَّفِقَةً فِي الْغَسْلِ جَمَعَ بَيْنَهَا فِي الذِّكْرِ....
Shahid's user avatar
  • 97
0 votes
1 answer
495 views

Word wildcard find & replace puts strings \1 and \2 out of sequence

In Word, I want to replace the colons between numbers with "p." to indicate a page number. This is similar to one of most common uses of this feature, to replace hyphens with en dashes (like ...
Erik Marsh's user avatar
0 votes
1 answer
63 views

How can I replace GPT with `jee pee tee` and not `JEE PEE TEE` in MS Word?

I have a Microsoft Word document containing: This document provides an overview of the GPT-3+ technology. The Word document contains a few more occurrences of GPT. I'd like to replace GPT with jee ...
Franck Dernoncourt's user avatar
3 votes
1 answer
397 views

Notepad++ Delete Multiple Lines with Find in Files

I want to delete the whole line that contains certain words such as: build, name, disk. I know that there is a search string ^.*?build.*$(\R|\Z) which will find lines containing "build" How ...
wikisP's user avatar
  • 33
1 vote
1 answer
238 views

How to find 2 consecutive words, but counting only the shortest string [closed]

I want to be able to search in Notepad++ for a string that begins with a [startWord] and ends with an [endWord]. Additional conditions: the [startWord] and [endword] can each only appear once in the ...
Atlantida23's user avatar
0 votes
1 answer
564 views

Remove a line containing a word and the previous line

I'm editing a HTML file on Notepad++, and the problem is that is a very big file, and I want to remove some unnecessary lines to work on it. The following code appears a lot in it, at the start of ...
Atlantida23's user avatar
1 vote
1 answer
533 views

Using REGEX only, copy last (delimited) word to every comma separated value?

I have a series of lines with arbitrary number of comma separated values, and then a hash marked comment. The challenge is, using only PCRE2 regex for use in PERL, to do the following: Store the ...
Tushar Bhutt's user avatar
0 votes
1 answer
1k views

How to replace the last space in a line with '|' character in Notepad++

I couldn't find any sample question that solves my problem in Notepad++. I have a string of n words in the following format in a Notepad++ text file: Word_1<**space_1**>words_with_spaces&...
Narayan's user avatar
0 votes
0 answers
48 views

Removing random image HTML inside SQL file with Notepad++

I'm trying to remove a bunch of HTML inside an SQL file with Notepad++. This is probably really easy, but having a hard time trying to understand how to do it. I want to replace these lines with ...
SyphonFilter's user avatar
0 votes
1 answer
2k views

Find and replace the exact match in a file - change the value of something in a file - linux terminal

1) I have a file : /etc/testconfig/users.conf : john1:*:$5$CJ5q52R0DPTbnvfddsa3IB/lofFuRoFnFc3OgKxkDP520PntI8pI76 john43:*:$5$cSV2tbDHA5645gdfN5w8W2TDMddyOPMBUR9nL7hQoVwF6QddElClKji/PB 54john:*:$5$...
alihsi1989's user avatar
0 votes
2 answers
251 views

Using regex to add commas to dates

How would I replace "Sat Oct 22 2022 at 0600 hours." with "Sat, Oct 22, 2022 at 0600 hours." The actual string would not have quotes.
JW555's user avatar
  • 1
-1 votes
1 answer
103 views

multiple codes in a cell to convert to text

I have a cell which contains multiples codes that are pipe delimited - up to 5 codes. Additionally, I have a decoder for the codes on a separate excel sheet. I basically want to replace the codes with ...
LIH's user avatar
  • 11
1 vote
3 answers
9k views

how to remove all zero width space from the text?

I know how to use regular expressions to do the mass search and replace task in editing program But I don't have or can't find the entire list of zero width space unicode. I quick searched the google ...
towner's user avatar
  • 11
2 votes
0 answers
870 views

Find and replace multi-line block in multiple files (bash/linux)

I'm trying to find a way to find a text block that meets the criteria: block starts with "google = {" block ends with next "}" character found - ignoring everything else. Example ...
jbl-toom's user avatar
0 votes
2 answers
3k views

Replace date format in Notepad++ using regular expressions

I have dates as MonthYear, Month-Year (ex: May16, Jul-21) but I need them to be in dd.mm.yyyy format. For example: Aug20, needs to become 01.08.2020 May-19, needs to become 01.05.2019 Jul18, needs to ...
moninah's user avatar
  • 35
0 votes
0 answers
42 views

How to randomize sensitve numerical data in Excel while maintaining existing data format(s) for public post? RAND each digit each cell

How to randomize sensitve numerical data in Excel while maintaining existing data format(s) for public post? This is to supply Technical Support all information (format, shape ) except confidential ...
panes-rubrics.0l_icloud.com's user avatar
0 votes
1 answer
1k views

Replace strings from text file with csv values

I've got a txt file (template.txt) with stuff like: Hostname from Client: !hostname . OS !windowsversion and a CSV-Export from many clients: !hostname, !windowsversion exampleName, Windows10-Pro I'm ...
taxyee's user avatar
  • 1
8 votes
4 answers
2k views

Find and replace in Notepad++: How to insert above line with same amount of indents?

I need to replace, in a large number of Python files with many function definitions, all occurrences of def some_func(foo, bar): with @jit(parallel=True) def some_func(foo, bar): with whatever level ...
srhslvmn's user avatar
  • 249
0 votes
1 answer
746 views

Excel Add text to the existing text values of multiple highlightes cells with different text values

I have cells accros multiple columns that I have identified by highlighting them in red. The values are names of employees separated by Alt Enter. I need to Add a new name (The same name) to all those ...
Andrés Delgado's user avatar
0 votes
2 answers
769 views

Find and replace a file in all the subdirectories

I'm new to linux. Using the terminal, i want to find and replace test.exe file with a modified file in all the sub directories of a directory called "abc". (The new modified file will have ...
Gladiator's user avatar
0 votes
0 answers
138 views

Gsar expert needed (search and replace, command line only)

I want to change a certain word in a file/on a line with a hex-value, with the use of gsar.exe (command line!), but ignore it if the word is somewhere between quotes Original text: 9023 AAAA "...
Henric's user avatar
  • 1

1
2 3 4 5
14