Category "replace"

js/ts translate internal commands

I am currently trying to translate some text-based console-log processing into JSON format. Console.log commands: give ENTITY.name = "entitytest"; give entity.u

how can I remove some NA rows but not all of them

I have multiple data frames with information about listed companies from the year 2000 So I want to put them in a list (lets call it df) because I want to do re

Replace_na with map function

penguins %>% map(~replace_na(list(.=0))) Why the code above didnt work to replace na in the dataset penguins? The result is below # A tibble: 8 x 1 .

Find and replace with PowerShell based on the next line

I'm trying to find and replace via PowerShell based on what's on the next line of the line I want to replace. For example, the following text file: blahblah

Better way to remove HTML tags in Oracle SQL

I have a comments column and the comments added to release are stored as rich text in comments column. Now i'm trying to process this data and get an human read

Using "register recall" to search and replace doesn't work when register contains newline character

I've been using the answer to Using visual selection or register for search and replace as follows: v visually select y yank :%s/ Ctrl+r " This works fine in mo

How to replace a value with NA across an entire dataframe

Is there any way to replace all the "-95" that can possibly exist in a dataframe with NA across all the columns?

Issues with replacing/updating files in tableau

enter image description here I'm a new tableau user, so please bear with me as I try to formulate my question. I just ran my 1st set of monthly reports this wee

How to replace double spaces with one space in filenames (also subdirectories) (CloudLinux Server release 6.10)

I want to replace double spaces with one space in the filenames of a lot of photos. These photos are located in directory /foto and it's subfolders. How to do t

How to replace a number in a string in Python?

I need to search a string and check if it contains numbers in its name. If it does, I want to replace it with nothing. I've started doing something like this bu

Python: remove single quotation in a string in a list

I have a list of items, list1, shown below: ["None", "A ','B", "A"] The second element of list1 is "A ','B". How can I remove the single quotation mark and

How to replace a character of a string if it is in a list in Python?

I need to check if there are any of the characters of a list of characters in a string and replace it with another character. e.g. characters = [" ", "-", "@"]

PHP each() function replacement

I read a textbook and it said each() function is deprecated. The author has recommend his own replacement for each() function called myEach() as following: func

How to search and replace text in an XML file using Python?

How do I search an entire xml file for a specific text pattern and then replace each occurrence of that text with new text pattern in Python 3.5? Everything

search and replace with regex to increment numbers in Visual Studio Code

I'm currently working on a big svg sprite. The diffrent images are always 2000px apart. What I have is: <g transform="translate(0,0)"> <g transform="

regex remove line breaks between double quotes without affecting other line break (eager match)

I have a map (key, value pairs) and few of these values have line breaks within them (inside double quotes) which is causing issues in CSS. How can I remove the

Strict regex in Pandas replace

I need to write a strict regular expression to replace certain values in my pandas dataframe. This is an issue that was raised after solving the question that I

Why are some characters ignored when calling LastIndexOf?

Please take a look at these codes : string str_to_find = "➖➖➖➖➖➖➖➖➖➖\r\n"; string str

How to replace pandas dataframe column names with another list or dictionary matching

I need to replace column names of a pandas DataFrame having names like 'real_tag' and rename them like 'Descripcion' list = [{'real_tag': 'FA0:4AIS0007', 'Descr

How to Replace text in the output from a Batch Script

I have a script I run and this is a sample output: OK J: \\har-fs01\dept OK K: \\erl-tbafs01.tbamerica.com\share OK