Questions tagged [find-replace]

Use find-replace for questions related to automatically executing a sequence of search, deletion, and insertion operations to exchange one string for another

References

191 questions
26
votes
5 answers

Find and replace text in all files in Rstudio

I am wondering why, still, there is not a feature in Rstudio to search all files in the current project (package) and replace a given text!? Or maybe there is one and I am not aware of! ctrl+shift+f only finds in all files without…
Farid Cheraghi
  • 847
  • 2
  • 12
  • 23
12
votes
4 answers

In Vim how do I efficiently search and replace “ and ” with normal double quotes "

I got this code snippet from a tutorial and I would like to search and replace all occurrences of “ and ”, with normal double quote ". How can I efficiently do it in Vim? { “runtime”: { “DDP_DEFAULT_CONNECTION_URL”: “http://127.0.0.1:8100” …
Jesus Nana
  • 121
  • 1
  • 5
9
votes
1 answer

Function to extract remaining string after last backslash

I need an Excel function that can extract a string after last \ from a path and if no \ found then take the whole string. For example: D:\testing\rbc.xls output will be rbc.xls D:\home\testing\test1\script1.sql output will…
user664481
  • 2,141
  • 9
  • 25
  • 31
6
votes
1 answer

replace in selection in vscode

There has been quite a bit of discussion (1, 2, 3) about whether "find" in vscode should default to the whole file, or to the selection. The discussion seems to have converged toward disabling "in selection" by default, but providing the…
user313032
  • 604
  • 1
  • 7
  • 18
6
votes
2 answers

VSCode Regex Find/Replace In Files: can't get a numbered capturing group followed by numbers to work out

I have a need to replace this: fixed variable 123 with this: fixed variable 234 In VSCode this matches fine: fixed(.*)123 I can't find any way to make it put the capture in the output if a number follows: fixed$1234 fixed${1}234 But the find…
Caius Jard
  • 72,509
  • 5
  • 49
  • 80
5
votes
0 answers

Replace character with page break in Google Docs

In Google Docs I need to string replace a pattern ($$$newpage) with a page break. Is this possible with standard page search? Or do I need to do it programmatically?
5
votes
4 answers

Find & Replace string using for /f with if statement and variables

I have written a batch file which I want to overwrite key strings with strings from another .txt file. currently it copies the new File.txt file perfectly but does not replace the strings with the strings from OldFile.txt file. example of strings in…
user6135601
4
votes
1 answer

Find and replace in Google Spreadsheet using Regular Expressions

I would like to use the Google Spreadsheet Find and Replace function with the "Search using regular expressions" function activated to do a search and replace in my document. Use case: Some of my cells contain erroneous linefeed characters at the…
Vivien Schreiber
  • 43
  • 1
  • 1
  • 5
3
votes
1 answer

Replace same character on one line multiple times Notepad++

I have a many files and in each file there is a line with the following (amongst other things). This line is not always in the same place, however, it starts from the beginning of the line. This line is also always different. slug:…
Kenneth Browning
  • 1,360
  • 1
  • 13
  • 22
3
votes
1 answer

vim replace after failed replace in macro

I have a big sequence of find and replace's in a…
Adam
  • 161
  • 7
3
votes
1 answer

Using Regular Expressions in Netbeans 8.2 "find & replace"

I am using NetBeans 8.2. I am working in the code editor window and trying to use regex in combination with the NetBeans find/replace feature. I have the regex button turned on. I am trying this on this code specStripWidthUpper:…
drwoodchip
  • 115
  • 2
  • 11
2
votes
2 answers

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 this: 1000x1000.jpg 1000 650x550.jpg…
EnigmaOs
  • 25
  • 4
2
votes
3 answers

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] cli_server.color =…
Vicky Dev
  • 1,893
  • 2
  • 27
  • 62
2
votes
1 answer

Advanced VS Regex Find/Replace: use string inside

to add another below each occuring

An example describes it better. Suppose you have a structure like this:

TITLE OF HEAD 1

ITEM 1, AFTER HEAD 1
ITEM 2,…
stst
  • 83
  • 1
  • 8
2
votes
3 answers

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 before the word sea. Before: After: Have you…
1
2 3
12 13