Questions tagged [replace]

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

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

for example, replacing all 'l' within 'Hello' with 'y', would result in 'Heyyo'.

27903 questions
6
votes
8 answers

Any Substitute API for Win32API?

I need an API that can make menus like Win32API, But something simpler and better than WinAPI. That can make GUI, with text zones, buttons etc...like an average Windows program.(Windows GUI Style) Can anyone recommand on one like it? Thanks.
Tal
6
votes
2 answers

Why does find . -not -name ".*" not exclude hidden files?

I want to ignore all hidden files, but especially .git and .svn ones when searching (and later replacing) files, not I have found that the most basic way to exclude such hidden files described in many online tutorials doesn't work here. find . -not…
user1273684
  • 1,559
  • 15
  • 24
6
votes
3 answers

How to find and replace contents of a bracket inside notepad++

I have a large file with content inside every bracket. This is not at the beginning of the line. 1. Atmos-phere (7800) 2. Atmospheric composition (90100) 3.Air quality (10110) 4. Atmospheric chemistry and composition (889s120) 5.Atmospheric…
aroos
  • 505
  • 2
  • 5
  • 12
6
votes
6 answers

replace every second comma of string using php

I have a string of that displays like this: 1235, 3, 1343, 5, 1234, 1 I need to replace every second comma with a semicolon i.e. 1235, 3; 1343, 5; 1234, 1 The string length will always be different but will follow the same pattern as the above…
Jack Php
  • 577
  • 2
  • 7
  • 25
6
votes
3 answers

String Find/Replace Algorithm

I would like to be able to search a string for various words, when I find one, i want to split the string at that point into 3 parts (left, match, right), the matched text would be excluded, and the process would continue with the new string…
sylvanaar
  • 8,096
  • 37
  • 59
6
votes
2 answers

Replacing text in a BLOB Column

In one of our tables we have a HUGEBLOB Column (Column name is DYNAMIC_DATA) which holding an XML data. What I need to do is updating a certain part of the text from within this BLOB. I've tried this query: UPDATE ape1_item_version SET DYNAMIC_DATA…
Alon Adler
  • 3,984
  • 4
  • 32
  • 44
6
votes
2 answers

SQL replace old values with new ones

I have a table named tbl.Products, which has a column named articlenumber and is full of numbers like s401, s402, etc. I generated a list with new article numbers which will replace the old ones: s401 I00010 s402 I00020 s403 I00030 s403 …
elhombre
  • 2,839
  • 7
  • 28
  • 28
6
votes
5 answers

how to do vi search and replace within a range in sublime text

I enabled vintage mode on sublime text.. but there are some important vim commands that are lacking.. so let's say I want to do a search and replace like so :10,25s/searchedText/toReplaceText/gc so I wanna search searchedText and replace it with…
abbood
  • 23,101
  • 16
  • 132
  • 246
6
votes
6 answers

Replace subdomain name with other subdomain Using JavaScript?

I'm trying to replace the subdomain name from "news.domain.com/path/.." to "mobile.domain.com/path/..", using JavaScript Any idea how to achieve this?
Bala
  • 362
  • 1
  • 9
  • 25
6
votes
2 answers

.NET Most efficient way to replace placeholders text with actual values?

I've a a template text (a newsletter text) to be sent to many users; in the text there are some placeholders, such as {{firstname}}, {{lastname}} and so on. What would be more efficient for replacing placeholders with actual values, .Replace(..)…
ʞᴉɯ
  • 5,376
  • 7
  • 52
  • 89
6
votes
1 answer

Wicket change label/textfield value

I am trying to learn Wicket. One of the problems I encounter, is changing the values of components like a label. This is how I declare the label: Label message = new Label("message", new Model("")); message…
Alex
  • 223
  • 1
  • 6
  • 21
6
votes
3 answers

How can I add an underscore before each capital letter inside a Java String?

I have a string like this "HelloWorldMyNameIsCarl" and I want it to become something like "Hello_World_My_Name_Is_Carl". How can I do this?
w4nderlust
  • 1,057
  • 2
  • 12
  • 22
6
votes
6 answers

Powershell function to replace or add lines in text files

I'm working on a powershell script that modifies config files. I have files like this: ##################################################### # comment about logentrytimeout ##################################################### Logentrytimeout=…
mles
  • 4,534
  • 10
  • 54
  • 94
6
votes
2 answers

jQuery remove all characters but numbers and decimals

var price = "$23.03"; var newPrice = price.replace('$', '') This works, but price can also be such as: var price = "23.03 euros"; and many many other currencies. Is there anyway that I could leave only numbers and decimal(.)?
user2179950
  • 93
  • 1
  • 1
  • 3
6
votes
2 answers

Javascript: Text Replace for multiple strings in array?

I have an array with Twitter hashtags. And I want to filter a string tw.text for those hashtags and wrap the words in a span var hashtags = new Array("home","car", "tree"); tw.text.replace('#home', '#home') How would I do…
matt
  • 42,713
  • 103
  • 264
  • 397