Questions tagged [character-replacement]

72 questions
0
votes
1 answer

Grid in Python Tkinter is Resizing Without Reason?

I am creating a To - Do List In Python, and I have to arrange 3 elements as I start. These include a Notebook in order to flip through notes and to - dos. The others are just labels with images on them. Here is the code. My question is that I'm not…
Aditya S
  • 33
  • 1
  • 9
0
votes
5 answers

Character replacement in string

I do need a working ASP.NET C# code to replace characters in a string. My following code works fine but in case of input "a" it gives me an output as "678d", but in case of input "c" the output is correct as it is i.e. "8d"... Here it automatically…
Karthik Malla
  • 5,570
  • 12
  • 46
  • 89
0
votes
1 answer

In Prolog, how can I create a list of lists when I am using a variable bound to several values?

Issue I am trying to move all new lists that I create into one super list of lists. Instead the output is formatted as a bunch of individually changed lists. The problem likely stems from the fact I use between to assign Iterations and Size, but I…
TonySax
  • 23
  • 7
0
votes
1 answer

Python3: change one character in a list of characters

I want to read a string from stdin and append this string to a list. Then I want to change one character at a time and append the new strings to the same list. pat=sys.argv[1] dummy1=list(str(pat)) myList=[] list.append(pat) c=0 for letter in…
Shushiro
  • 577
  • 1
  • 9
  • 32
0
votes
2 answers

How to remove middle character in a string in java?

I am trying to print the string without its middle character, but I am not getting the required output. public class StringIndexEliminator { public static void main(String[] args) { String str = "CARS"; int l = str.length(); …
0
votes
0 answers

Replace series of characters with another series, respectively

I wish to replace a series of characters such {a,b,...,x} with another series such {α,β,...,ω}, respectively and character-by-character (means a with α, b with β, ... ,x with ω), by use of Java. So I used this code and it works correctly: destSting…
Mir-Ismaili
  • 13,974
  • 8
  • 82
  • 100
0
votes
1 answer

Letter replacement

I want to make letters like 'å ä ö' visible. I need to replace these letters with ascii code, I guess. I have tried jquery and javascript, but it did not work. Look at the following code please:
Danny
  • 27
  • 8
0
votes
1 answer

Replace a string between regular expressions

I have a csv file with the following contents: INTERB-MNT,2008-09-10T21:05:38Z,2008-09-10T21:05:38Z,MARIA How can I use sed to replace the characters 'T' and 'Z', such that the contents of the file are changed to the…
user2965031
  • 61
  • 2
  • 7
0
votes
1 answer

Powershell Remove Special Character(s) from Filenames

I am looking for a way to remove several special characters from filenames via a powershell script. My filenames look like this: [Report]_first_day_of_month_01_(generated_by_powershell)_[repnbr1].txt I have been puzzling over removing the [] and…
0
votes
1 answer

Regular Expressions in Javascript erasing spaces

JAVASCRIPT REGULAR EXPRESSIONS This code searches for single quotation marks and replaces them with double quotation marks. It will not replace a single quotation mark that is part of a word (i.e. don't) function testRegExp(str) { var…
0
votes
2 answers

How to escape JavaScript RegEx replacement characters?

Consider the code below: var my_string = "aicId"; var my_pattern = "i"; var my_regex = new RegExp(my_pattern,"gi"); var my_result = my_string.replace(my_regex,"x$&y"); alert (my_result); This would return: axiycxIyd Now, what if I want it to…
Dentra Andres
  • 371
  • 1
  • 7
  • 18
0
votes
2 answers

XSLT 1.0 Translate String - Change Character to New Line

I am hoping this is a simple one, though it seems it often isn't... I am working with XLST 1.0 and I have a string which I need to translate. This string is a user-entered text field. It contains several smaller strings separated by a delimiter. (In…
Simcik
  • 45
  • 2
  • 10
0
votes
3 answers

Replacing names of the variable with value of the variable in a String in Java

I have a String like this: "#{var1} is like #{var2}. I would like to replace the "#{var1} and "#{var1} with the values of variables var1 and var1. Is there a smart way to do this without iterating over the whole string and finding the pattern #{}…
Amer Hukic
  • 1,494
  • 1
  • 19
  • 29
0
votes
1 answer

redirect output from tr

I'm trying to replace <92> with single quote in a webpage using tr. When I do tr "<92>" "'" < index.html the output shows me that the replacement has occurred. So to edit in place (or as close as tr gets) I do tr "<92>" "'" < index.html >>…
0
votes
1 answer

Couchdb documents fields data converted into �

I am working on web application with java using database couchdb. I am facing a strange error on my database. The Data entries in couchdb are getting converted into a speacial character(�). Multiple lines of this character gets inserted in database…
Vartika
  • 1,085
  • 3
  • 17
  • 43