Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [replace]

Replacing is the action of searching a string for a sub-string and replacing it with a different string.

replace
0 votes
1 answer
19 views

How should my loop replace values properly?

I am working on a scientific medical paper using the HADS-Score for assessing patients' anxiety and depression. This score consists of 14 items divided in two subscales (HADS-D, HADS-A) of 7 items ...
Gioni_Bletsch's user avatar
0 votes
1 answer
9 views

Visual FoxPro change account numbers in mass

I'm trying to renumber a host of account numbers where the apt_no field has some form of the word duplicate within it. This is Visual FoxPro and right now, I'm working in the command window. The first ...
Daniel's user avatar
  • 1
4 votes
3 answers
98 views

Create a string synopsis

Given a unknown string with an unknown size, e.g. a ScriptBlock expression or something like: $Text = @' LOREM IPSUM Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem ...
iRon's user avatar
  • 22.5k
-2 votes
0 answers
34 views

How to efficiently find and replace a substring in a string array in java? [duplicate]

I'm working on a java project where I need to find and replace a specific substring within each string in a string array. Here's a simplified version of my code: public class StringArrayReplace{ ...
Madhan Raj's user avatar
1 vote
2 answers
46 views

How to replace double slash in URL string with single slash in Python

I've got a URL that contains erroneous double slash(es) ("//") that I need to turn into single slash. Needless to say, I want to leave the double slash after "https:" untouched. ...
JohnK's user avatar
  • 7,257
0 votes
1 answer
23 views

how to change one word's font in track_list js?

firstly i have no idea how js works i'm sorry, i'm trying to learn how to change the font of a track name in a js playlist. sorry if it is a simple or stupid question. here is the code i have now: let ...
asa's user avatar
  • 1
2 votes
1 answer
72 views

String allocated on the heap is corrupted when being accessed outside of the function C

I was trying to write some code in C to replace a substring in a given string following this tutorial. I managed to get it working, however one of the problems with the function is that it will result ...
Ali Awan's user avatar
  • 322
-2 votes
0 answers
53 views

Fastest way to remove \r and \n characters in a string in PHP in 2024? [closed]

I need to replace a few characters ("\r" and "\n") in a string and need the fastest most efficient way to do so because this code will run on a large scale. I've searched and found ...
rami300's user avatar
  • 73
0 votes
4 answers
54 views

Replace every second letter with an underscore and return the result as a string

A challenge question "Given is a string hangmanString. Replace every second letter with an underscore and return the result as a string. The first character must be an underscore.". My ...
terry ikporo's user avatar
0 votes
1 answer
38 views

Dataframe replace columns and save to new df

I loaded in a .dat file to a pandas dataframe. Two of the columns are mean and error. I used the values in these two columns to create a randomized value for mean. I want to replace the mean column in ...
Allyand Camshow's user avatar
0 votes
1 answer
10k views

Iterations and multi-replacement

I have a file named file.in that contains 6 columns of data. One of the columns contains the mean and another contains the error. File.in is around 900 lines long with a different value for mean and ...
Allyand Camshow's user avatar
2 votes
2 answers
47 views

reg_replace in PostgreSql with pattern matching

I have below dataset, 1. '{SHEET,2730377,SHEET,5708283,DATA,3015937}' 2. '{SHEET,2730377,SHEET,5708283,DATA,3015937,DATA,0010965}' 3. '{SHEET,5708283,DATA,3015937,DATA,0010965}' 3. '{SHEET,5708283,...
Jim Macaulay's user avatar
  • 5,107
-1 votes
0 answers
21 views

Returning a wrong result when trying to add a value to the match by the PythonScript in Notepad++ [duplicate]

some of the GPS coordinates in my document are wrong. The coordinates in the document shown like: "-246.129464", "-246.129515", "-246.12978" But the real coordinates have ...
Light's user avatar
  • 23
0 votes
0 answers
46 views

PDFBox - Image Processing

I am working on code that will check each of the images in a PDF and do some image processing. As a proof of concept, to check that my image processing worked, I wrote a simple page parser that check ...
Invisible Coder's user avatar
0 votes
0 answers
16 views

Replace smartsheet with smartsheetr package

I am trying to read a smartsheet using smartsheetr package by @colej1390 and replace the samesheet with new data for next month with the same name/id. I tried it with a mtcars data set and it works. ...
krishthw's user avatar
  • 137

15 30 50 per page
1
2 3 4 5
1886