Category "replace"

How to replace words in real time like with Facebooks emoticons (javascript)

I want to replace words with others as soon as you finish typing them like Facebook emoticons. I ran into a few problems though. var word = 0; var matches =

How to replace words in real time like with Facebooks emoticons (javascript)

I want to replace words with others as soon as you finish typing them like Facebook emoticons. I ran into a few problems though. var word = 0; var matches =

MySQL importing and replace [duplicate]

I have a table with 2 columns: Id | Date 1 | 2022-04-01 With tons of row, like 30k I need modify all the dates, so I want to upload a CSV wi

Efficient way to replace a substring in entire project

Problem: Imagine I have a very large code base with millions of lines that has hardcoded SQL queries. For Example: String AA_Table_Query = "Select AA_Column_1,

Find last available date if date does not exist in other DataFrame

Suppose that you have two data frames which can be created using code below: df1 = pd.DataFrame(data={'start_date': ['2021-07-02', '2021-07-09',

How to replace a specific value in a MySQL row if the word is exist?

How can I replace a specific value in MySQL if it's exist? I have a servers table in that table I have an opts row the row's value is: +set net_port 28112 +set

I want to replace letters/words, but I am facing challenges in one aspect of my code

I will be using lloll as an example word. Here's my code: mapping = {'ll':'o','o':'ll'} string = 'lloll' out = ' '.join(mapping.get(s,s) for s in string.split()

UTF-8 encoding java replacement with 3 hex character

My application is receiving data from an endpoint. I do some processing with the received data and insert it into the database. At some point I had a problem wi

Replace multiple strings from CMS in Javascript

This code currently gets 'dynamic words' from the CMS and changes those to span's, which get a eventlistener on it whereas you click on them, something happens.

How to bulk edit/replace numbers in Notepad++

I want to change the following: 0.25 10.00 10.00 to "0.25" "10.00" "10.00" So that means changing to: "(number)"

Search and replace in 1 step instead of 3 with Vim regex

I have this code that I'd like to transform: const createFacebookAdVideoPayload = { const accountId = faker.datatype.uuid(); const pu

Javascript method to capitalize the first letter of every word and also every word after hyphen or dash

I need a JavaScript method to allows me to convert the first letter of every word in a string to a capital letter like this: mike tyson wayne to Mike Tyson Wayn

Is there a simpler way to hide a message in text?

I'm a newbie in Python. I have a sample.txt with random generated numbers, like: 190372210335873910924370795570288776927025955114012905862203094277820432758989

Can't remove backslash from string in Python

I want to remove backslash from a string, I tried result.replace('\\','') but nothing changed. Anyone has an idea how I can remove it? result = '[(\'company_ids

Speed up millions of regex replacements in Python 3

I have two lists: a list of about 750K "sentences" (long strings) a list of about 20K "words" that I would like to delete from my 750K sentences So, I have to l

how to replace a single key value pair from an object in react.js

I have a single object of with key value pair, and i need to replace the first key value pair with a new key value in react.js. I have tried to make immutable p

Regex for double quotes inside string

A follow up to my previous question here. I realize I need to be more specific regarding my regex case to get an answer that works for my case. I am fighting w

replace text between two strings in a file - python

i have a sh file, i need my python script to find specific strings and replace all the text between them in it: hello_example=( # <- this specific line "bla"

Powershell - add string after 14th 24th 36th 46th and 55th character following a word

We have many files which contain header lines beginning with HDR that need to be updated for clarity. I am new to coding in powershell and would like to know h

Use Wildcards in Replace Function in combination with 2D Array Values

I'm trying to go through a list with two columns and replace some of the text in the second column. I want to search for values using wildcards in combination w