Questions tagged [character-replacement]
72 questions
0
votes
1 answer
Remove \n from specific lines Python
I have a function where I am converting pdf files to text files. It's all working fine, except I have to clean up the paragraphs where there are bullet points by removing \n from the end of each string line that starts with the word bullet_point. I…

Monica Nugent
- 21
- 5
0
votes
0 answers
Replacing a Character in .csv file only for specific strings
I am trying to clean a file and have removed the majority of unnecessary data excluding this one issue. The file I am cleaning is made up of rows containing numbers, see below example of a few rows.
[Example of data][1] [1]:…

MHarrison
- 1
- 1
0
votes
3 answers
Having problems troubleshooting my for statement in java
I'm trying to print ooed (changing the name from Fred to ooed), but my program won't change the first letter ('F') while changing the rest.
String name = "Fred";
String namea = name.replace('a', 'i');
String nameb = name.replace('n', 'i');
String…
0
votes
1 answer
Swift: How to access iOS text replacements from keyboard extension?
I am building a custom keyboard, and I want to use the built in text replacements feature. The text doesn't change automatically for my keyboard, yet other third party keyboards do work with text replacements.
There is a…

Grant Oganyan
- 352
- 1
- 11
0
votes
1 answer
Forward slash "/" in string converted to "/", is that platform independent behaviour?
I have a Python script that reads an html into lines, and then filters out the relevant lines before saving those lines back as html file. I had some problems till I figured out that a / in the page text was being converted to / when saved as a…

theflyingbelgian
- 13
- 5
0
votes
2 answers
Character Replacement: Break-Lines
I have a few areas in an application of mine that I have

Phillip
- 1,558
- 3
- 15
- 25
0
votes
1 answer
Replace multiple Value from another table
I have 2 tables.
Table1
ID | String
1 | "A TEST B VALUE"
2 | "C TEST D DENT B"
Table 2
ID | Name | Value
1 | A | 1
1 | B | 2
2 | B | 3
2 | C | 4
2 | D | 5
The result I am hoping to get is
ID | …

ElevenCent
- 19
- 4
0
votes
1 answer
How to Replace Words in all the Title Attributes using PHP
I have search around and only found replacement options that were not specific to the need I have below.
However, the closest thing I found was this:
preg_replace('//','chocolate chip cookies',$items);
I think an answer to…

Sammy
- 877
- 1
- 10
- 23
0
votes
1 answer
Can i use gsub function to find a pattern and replace it by 2 different patterns?
I need help with finding a pattern and replacing it by two different ways. For example, the word "Code/i" should be replaced with "Code, Codi".
What code should I use in replacement to get two results separated by comma? I am new to R and assuming…

Karina
- 33
- 4
0
votes
1 answer
Unable to Replace "\r\n-" in Text Extracted from PDF File Using readtext() from readtext Package in R
I am trying to remove "\r\n-" in a text which I extracted from a PDF file using readtext() from readtext package in R Studio. Below is my code in R:
library(readtext)
jd <- readtext("C:/Users/HomeUser/Documents/Sales Manager.pdf")
…

William
- 1
- 1
0
votes
1 answer
uGUI Text Field, How to Remove "Replacement Characters" (uFFFD aka �)?
Using the uGUI Text component, I'm getting "replacement characters" aka � and I can't find a way to remove them.
I'm getting a string from the Instagram api which contains unicode characters for both non-alphabet language characters (for Japanese…

znerolnoht
- 122
- 11
0
votes
0 answers
Replacement Character inserted between each letter of CSV Dataset. How to Replace?
I'm working on importing a CSV dataset into a google sheet from my drive. I have the script working, however whenever the data imports it looks like this.
After Import
var file = DriveApp.getFileById(url);
var csvString =…
0
votes
1 answer
Replace slash with a single backslash in R
This is probably trivial, but I have failed to find any question referring to this exact issue.
My issue does not have to do with coming up with a suitable regex, it has to do with accurately specifying the replacement part.
x =…

GerasimosPanagiotakopoulos
- 577
- 7
- 22
0
votes
2 answers
How to replace a character that exists independently rather than with other characters in an NSString?
Ok lets suppose i've got this string:
R RATS ARE FAR
I want to replace the independent R with an X so to make:
X RATS ARE FAR
I've tried stringByReplacingOccurrencesOfString but that replaces all R's to X's. One way to accomplish it is to check…

Tobias
- 579
- 1
- 5
- 15
0
votes
1 answer
how to replace a substring of a string with a constant charecter like 'X'
I have a string like below
std::string s = "123468998";
I want to replace all the character from position 0 to 4 with character 'X'
so my string will looks like
"XXXXX68998"
is there any in build function available for this or i need to do it…

Nimay Das
- 17
- 1