196 questions
0
votes
1
answer
73
views
Replace multiple spaces with single space using Word Find Replace with track changes on
I am implement a function to do below two tasks. User have the ability to either run both or run a single task only (handle via check boxes).
Task 1 : Replace multiple spaces into a single space on a ...
-3
votes
3
answers
327
views
Efficient mass find-replace in Word via VBA
I have a VBA-based tool that basically for each row in the Excel takes a defined word document and performs number of find-replace operations. This has been working well so far, but I am starting to ...
-4
votes
8
answers
357
views
Find/replace fixed multiline strings in POSIX `awk`; `ed`; or `sed`? [closed]
https://github.com/chmln/sd allows for easy find replace of fixed strings; as does https://github.com/facebookincubator/fastmod. How do I replicate this simple functionality in POSIX /bin/sh using non ...
0
votes
0
answers
74
views
VSCode Regex: Capturing area codes differs from regexone.com's Exercise 2 behavior [duplicate]
I'm learning regex on regexone.com. In exercise 2: Matching Phone Numbers, The same patterns work differently between regexone.com and VSCode's find/replace feature.
The exercise shows these test ...
0
votes
1
answer
70
views
FindAndReplace on multiple columns
I have a workbook with multiple sheets.
The first sheet, "Task", contains the data.
The other sheets are lists for find and replace operations.
I have run the Sub successfully, replacing the ...
1
vote
2
answers
40
views
How to put the same character in the beginning of all rows using regex?
I have a list of 10 digit numbers in a txt file.
I want to put the same character in the beginning of all rows using regex, without changing the numbers.
I also want to put the character at the end of ...
1
vote
1
answer
48
views
Find everything between ( ) and turn it into a hyperlink
I need to find everything between parentheses and turn it into a hyperlink in which the string is "[Pmcid:"the thing"]" and the address is a url with "the thing" at the ...
0
votes
0
answers
26
views
find and replace number after specific string in xml using regular expression [duplicate]
I have an xml payload as shown below. I need to be able to find the property "ACME Account", and then the next value property value, replace the number with a new number. So in the example ...
-1
votes
1
answer
46
views
google sheets, search and replace for next colum
I have a list of things and want to get them in two seperate colums. Can I do that by using search and replace ? or How do I do this ?
Here is an example
How it is
How it should be
0
votes
2
answers
143
views
Set specific condition to replace text in Word VBA
I'm trying to create a macro that replaces a piece of text with specific conditions.
For example:
if it's shown in the document "Summary nº 123" then keep the text the way it is,
but if it ...
1
vote
1
answer
61
views
Remove a portion of String after certain value
I am using below mentioned code for finding a string in a file(Constants.TcGVL), assign my desired value(%select%) to it and copy to a new location:
Call :ValueSubstitude "%root%\LeafSpring\...
1
vote
1
answer
171
views
Using Microsoft Word wildcards to match timecodes
I want to remove the timecodes from the Microsoft Word Document.
I have following pattern:
00:00:00:00 - 00:00:00:00
I am using this script:
[0-9]{2}\:[0-9]{2}\:[0-9]{2}\:[0-9]{2} - [0-9]{2}\:[0-9]{2}\...
0
votes
2
answers
71
views
What regex would I use to add javadocs to a java program in vscode?
My current attempt:
Find: (^$\n[\s]*.*\{|^$\n[\s]*.*@.*$)
Replace: /***/$1
Problem: works well except for the fact that the javadoc boilerplate is not indented.
What change would I implement to indent ...
0
votes
1
answer
373
views
Visual Studio IDE - Find and Replace Prevent Jumping to Next Result?
Is there any workaround or extension to prevent Visual Studio IDE 2022 from scrolling my view when clicking the "Replace Next" button in the Find-and-Replace related windows?
I use REGEX ...
1
vote
1
answer
2k
views
VBA, setting a range in a Word document to edit a specific section of text
I am working with VBA in an xlsx document, and I am attempting to alter a separate rtf document to replace the words in a specific range between two tags on the document. I have managed to replace all ...
0
votes
1
answer
165
views
How can I use RegEx to find and replace over multiple columns in Google Sheets using App Script?
I want a find/replace script in Google Sheets App script using RegEx to find and replace over multiple columns. I can only either find and replace using RegEx in one column or find and replace over ...
0
votes
0
answers
174
views
Create Apple script / Automator's app for find/replace in PDF files
I have a small problem with PDF files that I export from Figma.
I make a text link in Figma file
I export PDF with this text
I open PDF in Acrobat (or whatever viewer) and I see my link in black box (...
1
vote
2
answers
2k
views
"Replace All" does nothing when using the "Replace in Selection" feature in Visual Studio Code
Replacing in selection is a crazy difficult process - and it apparently does not even work. Getting to the point of even having Replace in Selection enabled we need to:
highlight the area
Hit Find ...
0
votes
1
answer
423
views
How do I find and replace all occurrences of a mapping of multiple replacements in Visual Studio Code?
Is there a way of taking the native function of changing all occurrences within a file at the same time? Let's say change all FR1 to FR2 by selecting FR1 and pressing Ctrl+ F2 then typing FR2 and ...
0
votes
1
answer
176
views
RegEx code to find duplicate (parts of) sentences anywhere in LibreOffice Writer?
I have created a RegEx code to find the following:
- strings, or parts of strings (at least 5 consecutive words), that appear at least twice in the whole scope of text
- the whole scope of text is in ...
0
votes
1
answer
119
views
Find and replace using VBA
I have a chart where I need to remove certain keywords from column C- Range C3:C5000(some cells are blank). The words that needs to be removed are placed in column A- Range A3:A100(some cells are ...
0
votes
1
answer
943
views
Excel: Find and Replace External Reference Values
The true problem I'm trying to solve:
I've pasted text including formulas from one Excel workbook to another, but I don't want to reference the old workbook in the formulas
The question I'm asking:
...
0
votes
0
answers
60
views
Is there a way to put a section of a line at the start of every subsequent line using regular expressions?
I have a text file in which there is a line with the category and then all items of that category in lines below it. This is followed by 2 empty lines and then the title of the next category and more ...
0
votes
1
answer
559
views
Visual Studio Code - How To Replace "X" with a list of data? - JSON
I have a question I need to code thousands of lines and instead of doing it manually I want to automate my work flow. So let me present you with some screenshots and a text example of what I am trying ...
0
votes
1
answer
213
views
Find and replace a text string in protected rtf Word document
When running the VBA code below on a folder that contains approximately 100 rtf Word documents, I receive the following VBA error.
"Run-time error '4605' This method or property is not available
...
0
votes
1
answer
424
views
find/replace across multiple files (in macOS)
In macOS I find the below command line quite useful and efficient to find/replace across multiple files (I know there are other ways to do it --for instance, using sed-- but this one is good enough ...
0
votes
1
answer
96
views
Excel find and replace causing issues with range criteria in formula
Currently I have a workbook that has thousands of formulas in it. When I created the sheet there was an unknown variable that was yet to be decided upon.
So I chose to place (,"**",) in the ...
1
vote
1
answer
2k
views
Plus Symbol in front of a phone number converts it into a formula
I have a list of over a thousand phone numbers in a google sheet. Many of these numbers have a plus symbol in the start. Google sheets is automatically converting this numbers to Formulas by replacing ...
0
votes
0
answers
151
views
How to MySQL REPLACE html/mjml code with html tags
I have a lot of email templates stored in MySQL database.
Inside i have a table which stores the MJML code of the template.
Now I want to update a few lines of code in all of my emails. And I want to ...
0
votes
1
answer
285
views
Powershell scripting replace of variable value within text file like tnsnames.ora where the text for replace is unknown
I'm trying to write into my powershell script the ability to insert a hostname into a file like tnsnames.ora.
The file I am working with has a default value in that field, and I can't rely on what ...
1
vote
1
answer
1k
views
How to insert a newline character in a jupyter notebook cell when using find and replace?
So I need to make changes in multiple cells in a Jupyter notebook. One of these changes is inserting a newlines in a code line.
fig = fig.update_xaxes(showgrid=True, gridwidth=0.3, gridcolor='...
0
votes
1
answer
58
views
Apply find/replace routine to entire document
I have a macro to ensure large numbers have commas in the correct locations.
My routine to insert commas works, but also includes dates, street #s, etc. (e.g., 15 January 2,022 and 1,234 Smith Street)....
2
votes
0
answers
2k
views
intellij, fix missing imports on all files?
After a find+replace on a large project, I realized I used a static class from the project not already imported in all files.
Is there any functionality in Intellij that is equivalent to opening all ...
2
votes
1
answer
1k
views
Is there any way to clear search history in find/replace box in VS Code?
My case: I have a lot of search inputs. Often I need to clear this history, make two or little more search inputs and switch between them.
I have only found a way to solve my problem with Windows ...
0
votes
0
answers
317
views
Libreoffice Calc - replace text 123db with number -123
I have a column imported from something else where money values are expressed as 123.00DB
I need to convert them to something more useful, which needs to be numeric, eg -123.00
I want to do this with ...
2
votes
2
answers
904
views
Find and Replace multiple digits with the last character in notepad++
Does anyone know how to replace several different Digits all at once in notepad++.
For example, I have 4 different Digits;
1000x1000.jpg
750x750.jpg
1000x750.jpg
750x1000.jpg
I want the result like ...
2
votes
3
answers
182
views
Regex: Remove empty sections from INI (Text) files where the files could contain multiple such sections
I have below resultant php.ini file, after I was able to remove the comments & spaces thro' some simple Regex find/replace steps:
[PHP]
engine = On
short_open_tag = Off
....
....
[CLI Server]
...
0
votes
0
answers
334
views
Word VBA Search for All Array Values
I have an array of words, and I want to be able to execute selection.find for any of them.
The array is just the product of a previous string, so
myarray() = split(mystring, ", ")
So, for ...
0
votes
1
answer
148
views
Find and replace string with empty paragraph inside .doc and .docx word document
Sample environment:
Dictionary = {"camel":"create-para","donkey":"monkey","cat":"dog"}
cwd = os.getcwd(".")
for files in cwd
...
0
votes
2
answers
81
views
Script to copy contents of cell (in a2) and paste this into 1st empty (of text and formulas) cell on row 2
I am trying to write a script to copy contents of cell (in a2) and paste this into the 1st empty (of text and formulas) cell on row 2.
Ones that I have tried to copy and use are to do similar but ...
0
votes
1
answer
918
views
VBA Find & Replace Changes Date To US Format
when I run find and replace through vba it changes my dates to us format. So I have a column of dates, but they are all prefixed with text that I want to remove (like so Invoice Date:dd/mm/yyyy). When ...
1
vote
1
answer
171
views
How can I set the FindReplace box in VBA to allow Word Document editing while the box is still active?
I'm trying to code some routines in VBA for Word that use regular expression to search for certain elements in documents. I got this code (please disregard for now that it's coded using Selection, it'...
2
votes
1
answer
91
views
Advanced VS Regex Find/Replace: use string inside <h1> to add another <td> below each occuring <td>
An example describes it better. Suppose you have a structure like this:
<h1>TITLE OF HEAD 1</h1>
<table>
<tbody>
<tr>
<td class="one"&...
2
votes
3
answers
263
views
Python to Find-replace a string and Create Two Paragraphs Before String in Words Document
I have a VBA Macro. In that, I have
.Find Text = 'Pollution'
.Replacement Text = '^p^pChemical'
Here, '^p^pChemical' means Replace the Word Pollution with Chemical and create two empty paragraphs ...
1
vote
1
answer
248
views
TypeError: unsupported operand type(s) for +: 'Paragraph' and 'str'. Replace words after a paragraph in Python
I want to Find and replace text which is only after a paragraph.
Text in my word document:
As you can see, I want to replace the Word Ocean which is at the end.
So, I want to replace the word 'Ocean' ...
-2
votes
2
answers
190
views
Python to create a find-replace dictionary from a word vba macro
I have a very big macro
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "asa"
.Replacement.Text = "fsa"...
-1
votes
1
answer
1k
views
I have Microsoft VBA Code to bulk Find and Replace in .word files - it it possible to edit to
I was provided the code below through the Microsoft support service to help me go through and batch "find and replace" specific text in a large number of word documents. The use case for ...
0
votes
1
answer
155
views
How to change automatically the old routing style of Laravel to the new style in Laravel 9 with vscode?
Hello I am facing a problem which is to change the old routing style of a laravel project to the new style. But due to the size of my routing file it will take me a lot of time to change all this. So ...
0
votes
1
answer
338
views
Why this find multiple and replace multiple script not working
I am not able to understand why this below script not working on google sheets,
function Find_Multiple_Replace_Multiple(){
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data&...
0
votes
1
answer
201
views
Highlight text from one open parenthesis to the next open parenthesis
My goal is to highlight text from one open parenthesis to the next open parenthesis, if there is no closed parenthesis between them.
Sub HighlightNestedParentheses()
Selection.Find.ClearFormatting
...