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
0 answers
6 views

MS Word: Need help to write a VBA script [closed]

I would like to replace all line breaks (^p) in a particular Word document with a single space. Exceptions: It is 2 or more consecutive paragraph breaks (i.e. an actual, desired paragraph break) ...
Geth's user avatar
  • 1
3 votes
2 answers
266 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
37 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
22 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
  • 290
0 votes
1 answer
38 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
49 views

Find text between parentheses and delete rest

I have paragraphs like this: (قَوْلُهُ: وَمَسْحُ الرَّأْسِ) إنَّمَا أَخَّرَهُ؛ لِأَنَّهُ مَمْسُوحٌ وَالْأَعْضَاءُ مَغْسُولَةٌ فَلَمَّا كَانَتْ مُتَّفِقَةً فِي الْغَسْلِ جَمَعَ بَيْنَهَا فِي الذِّكْرِ....
Shahid's user avatar
  • 53
0 votes
1 answer
23 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
54 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
95 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
56 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
49 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
146 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
374 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
36 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
586 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
99 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
46 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
2 answers
2k 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
263 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
1k 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
  • 19
0 votes
0 answers
37 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
517 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
  • 239
0 votes
1 answer
191 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
163 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
80 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
0 votes
1 answer
60 views

replace a string, but ignore the ones that are between quotes (command line)

I am trying to replace a string in a text in a file, with a hexvalue with gsar, but I am in doubt if gsar can fix this :) Original text: print "this is a print" "print" "*:;...
Henric's user avatar
  • 1
0 votes
0 answers
15 views

MS Word "find with formatting" is not finding all results?

1 . All of the following text has the Font of Palatino Linotype Figure 6-1. A simple event-driven service that looks up the data it needs as it processes messages Figure 6-2. A stateless streaming ...
Nor.Z's user avatar
  • 125
1 vote
1 answer
1k views

Outlook Search in Mail function (ctrl-f equivalent)

I need to find a certain keyword in an outlook email. Typically you would use ctrl-f in a situation like this, but annoyingly outlook has never supported ctrl-f searching When I search the internet, I ...
berala's user avatar
  • 89
0 votes
1 answer
859 views

Regex to delete text before Email Address

This is what I have: FirstName1 LastName2 name1@email.com ID1 FirstName2 LastName2 name2@email.com ID2 ... and so on. This is what I need: name1@email.com ID1 name2@email.com ID2 ... and so on. As ...
user19331467's user avatar
0 votes
2 answers
993 views

Why Dreamweaver regex replace into a wrong character? (-- How to regex replace content specific to (inside) an html tag?)

Situation Here is the Regex & Substitution I used for Regex replace in Dreamweaver:: (( and )|( that )|( include )|( includes )|( including )) $1<br/>\n image: settings for Regex Replace ...
Nor.Z's user avatar
  • 125
0 votes
1 answer
14 views

How to do a bulk delete or replace

How to do a massive replace or delete (44k+ lines) with the below: Line 238440: <FLTR> Line 238441: <FLTR> Line 238442: <FLTR> Line 238443: <FLTR> Line 238444: <FLTR> ...
Luis's user avatar
  • 1
1 vote
1 answer
189 views

Remove the first blank line from every document Notepad++

I use markdown with YAML frontmatter as below. I want to remove the first blank line that appears in every document using Notepad++. I would appreciate if anyone could help me to do this. Thanks in ...
user18336975's user avatar
1 vote
1 answer
67 views

Find the word "Dr" (with the "r" in superscript) in MS Word, and replace it with "Dr" (with the "r" in normal font)

I am looking for a way to replace all occurrences of "Dr" ("r" in superscript) with "Dr" ("r" not in superscript) in a Word document. Thanks to all.
user1685291's user avatar
0 votes
1 answer
120 views

Add incrementally ascending numbers in Word find and replace

Is there any way to add ascending numbers in "find and replace" in Word - Office 365 for Mac? I would like to add a number to every ocurrence of a word. For example I want to replace: In ...
user avatar
1 vote
1 answer
589 views

Extract/Replace and Convert string in Notepad++

i have a file looking like this: Line 207: ["Mystic Scroll: Shock and Swarm"] = { Line 297: ["Mystic Scroll: Concentrated Solar Beam"] = { Line 474: ["Mystic ...
Derind's user avatar
  • 13
0 votes
1 answer
241 views

Finding and replacing " with « in Microsoft Word

I'm using macOS version of Microsoft Word (2019). Been doing my final uni project for the last 3 months. Ended up with doing quoting wrong all along I used " in the entire document while should'...
Joe D's user avatar
  • 113
1 vote
1 answer
613 views

Searching for multiple line breaks in Notepad++

I have a large text file that I am editing in Notepad++ and want to search for all instances where there are two line breaks and a particular string of characters on the following line (i.e., two left ...
the_sage1313's user avatar
0 votes
2 answers
746 views

Powershell: How do I shift a date (format: yyyymmdd) from any position in the file name to end of the file name?

Currently im using dir | Rename-Item -NewName {$_.name -replace "",""} to rename files in a directory. The file names vary and need to be unified. Examples for file names: ...
schwadinho's user avatar
-1 votes
2 answers
742 views

I have a list of searching word. How to replace them in another file?

I'm sure this question is asked multiple times, but I fail to find it. Basically I have a text file, and a list of all search strings (e.g. cat, dog, banana, etc). I want all occurrences of those ...
Ooker's user avatar
  • 1,897
1 vote
0 answers
49 views

Remove lines with less than X number of letters from Microsoft Word (2016 or higher)?

I'm using MS office 365. I have a big MS word document containing more than 10000 lines. The document has some meaningless lines that contain meaningless alphabet letters, unknown Asian letters, ...
exsonic01's user avatar
  • 125
0 votes
0 answers
646 views

Word VBA select all left indented paragraphs to format text

I want to change the font colour of all left indented paragraphs (in documents exported as rtf from another program). The paragraphs dialog shows they are all indented by 7.94 cm. I have done this by ...
Piecevcake's user avatar
0 votes
1 answer
135 views

Find and replace from a different text document from each new line

I have some file conversion software that which works through cmd and doing something along the lines of: converter.exe input.wav -o output.wav --ffmpeg "-af volume=0.1" I'm trying to ...
kjm22741's user avatar
0 votes
1 answer
37 views

Remove specific text separated with comma

I have srt file containing following text 1 00:00:06,139 --> 00:00:07,140 F/6.3, SS 800, ISO 200, EV 0, GPS (76.2463, 25.7251, 16), D 93.74m, H 35.00m, H.S 2.09m/s, V.S 0.10m/s 2 00:00:07,140 --&...
Amir Khan's user avatar
1 vote
2 answers
144 views

How to change random domains to a simple domain using Notepad++

I have a file with a random domains like this: host-name estkowjf.tradicebk.cz domain-key smtp,*,/home/pmta/keys/dkim.pem </virtual-mta>...
HICHAM KADIRI's user avatar
0 votes
2 answers
232 views

notepad ++ Help need to split groups of 4,6,8 digits to groups of 2

I have some data and would like to split the groups of 4,6 and 8 digits into groups of 2 3 16 53 7282 192331 68 83 9 29364255 00001 4 10 57 7188 6 3943 6574 1228 4558 79 00002 2 415266 80 142433 7887 ...
David's user avatar
  • 1
1 vote
2 answers
1k views

Remove all spaces and tabs from ONLY specified segment line?

I use Notepad++ v8.1.1. How to find a specific segment and remove all spaces and tabs from ONLY that segment? E.g. I want to find all "EQD" lines and remove all spaces and tabs from JUST ...
John Tee's user avatar
4 votes
2 answers
21k views

Regular Expression To Match Multiple Lines Of Text

I am trying to match lines that start with and end with the following tags using regular expressions: <Description> </Description> Inbetween the tags, there can be multiple lines of text, ...
Help's user avatar
  • 55
1 vote
1 answer
389 views

Regular Expression To Find And Replace Text

A file has hundreds of lines of text similar to the one below: <Random Variable1="test" Description="this is a random description" number="12345" /> The value &...
Help's user avatar
  • 55
0 votes
1 answer
65 views

Inject a page break before numbered list in MS word

I have a document with 70+ questions in it. Most of the questions were numbered using MS Word's numbered list. I need to inject a page break before each of these questions so that they are on their ...
Alexander Dixon's user avatar

1
2 3 4 5
14