Questions tagged as 'replace'

1
answer

how to remove \ n from a string in python

I'm trying to exclude control strings from (\n, \t, \u) of strings in Python and I can not do it with either replace or re.sub() . How could I do it? I've tried, and they have not worked: p = re.sub('\n', '', p) p.repl...
asked by 06.04.2018 / 17:44
1
answer

ASP Classico: How to replace the character "SLOPE" with "TRACE"?

I have a problem - when using a component for PDF - I ended up having an "Out of Range" error when generating the PDF document. I found the problem with the error line and found that the error was because the user registered a "SLOT" in the s...
asked by 22.06.2017 / 02:02
1
answer

How to "clean" a csv file with Python?

Hello! I am extremely new to programming, so I apologize if I can not explain what I am trying to do or if my code is very wrong. I have a recurring task in my job which is to open a list of restaurants in Ifood, collect the prices of each of th...
asked by 18.10.2018 / 15:32
1
answer

Replace SQL SERVER between columns

How to do a replace between columns in SQL SERVER. For example, given the table below: COLUNA_A | COLUNA B | COLUNA_C A 123 casa I tried to run the query: SELECT REPLACE(COLUNA_C, COLUNA_A, COLUNA_B ) FROM TABELA To try...
asked by 09.12.2018 / 14:24
1
answer

How to get the value of $ _GET ['sealed'] to leave the checkbox selected using PHP

I have an array in PHP that is the values selected from the checkbox, which were obtained by $ _GET: $_GET['selecionados'] = array(2) { [0]=> string(1) "a" [1]=> string(1) "b" } Here are the chekboxes: foreach($selecoes = $check...
asked by 19.10.2018 / 14:46
2
answers

Regular expression to deny everything other than social reason

I'm trying to create a regular expression to remove everything that is not part of the business name in a string, but I'm having trouble not removing the symbols that are in the middle of it. Entry: 201700000000111 01/02/2017 11.111.111/000...
asked by 17.04.2017 / 17:34
1
answer

How to create file with date in iso string in name?

I'm having trouble creating a file with the following template: 2017-01-17T09:42:15.3419026-02:00_teste.txt When I run the application to create, this message appears: The given path format is not supported. var dataHora = DateTimeOffs...
asked by 17.01.2017 / 12:46
2
answers

Replace with variable - mysql

How can I make Replace using a variable? A given variável receives values from a query, so I need to make a Replace in a given column, with the values obtained, how can I do this? follow example in fiddle: link   ...
asked by 27.07.2018 / 03:17
1
answer

Python - Replace x lines above and below searched text

Good, I needed to do something that in a document filled out for example like: linha1 bla bla linha2 bla bla linha3 bla bla linha4 bla bla linha5 bla bla linha6 bla blax linha7 bla bla linha8 bla bla linha9 bla bla When doing a search fo...
asked by 19.07.2018 / 16:37
2
answers

Problem replacing strings

Hi, I'm starting to create an interpreter of equations, I want to replace operators with words, but things are not going well ... main.cpp #include <string> #include <iostream> #include <fstream> #include <vector&...
asked by 19.06.2018 / 04:19