Questions tagged as 'str-replace'

3
answers

Replace strings with replace JS

Hello I have the following code in JS that detects me in a block of content if it has any of the following sequences of characters and they have to be replaced by images, the problem is that the replace function does not allow me to replace them...
asked by 28.04.2018 / 20:27
2
answers

javascript function replace

From the following function, how do I substitute blank spaces with hyphens? <!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8" /> <title>Ej funciones</title> </head> <body> <script...
asked by 25.10.2018 / 18:21
2
answers

php - str_replace

I'm in PHP with my next problem. In a variable I receive the surname of the user but if the surname is for example, Hernández the variable saves Hern\u00e1ndez . So that the last name I can later send it as it plays in a json, I...
asked by 06.08.2018 / 12:57
3
answers

Alternative to .replace () so that it does not generate error in function with keys

I am creating a function that takes a nested array and returns it in a one-dimensional array, the problem is that I can not make it walk for cases in which keys {} are an element of the array, since the function .replace detect the laves, return...
asked by 21.08.2016 / 01:19
1
answer

I'm playing the hangman game, and do I need to change a string for a char? but only one in a position

public class replace { public static void main(String[] args) { Scanner teclado = new Scanner(System.in); String sentence = "SISAS"; String auxWord = sentence; int g = sentence.length()*2; String remplazo = "_ "; while(r...
asked by 22.07.2016 / 02:32
2
answers

problem with decimals and thousands

I have this edition for an update, where the value is a decimal number with 15.2 (fifteen whole digits and 2 decimals) and replacement comma (,) by period (.) to add it to a database. include ("connection_upload_csv.php"); if(isset($_...
asked by 12.03.2018 / 14:20
1
answer

How can I replace multiple texts using Replace?

I'm looking to replace several strings and then write them to a .csv file Everything works well when I replace a single text, but when wanting to replace 2 or more, I only take the last replacement text, which only allows me to put a string a...
asked by 05.06.2018 / 20:18
2
answers

Replenish div tags by p in php keeping classes and / or styles [duplicated]

Hello friends, I have this doubt as <div> tags by <p> in php but ... I have <div> tags that have classes and / or styles that I want to keep with their respective% </div> Try this bu...
asked by 23.02.2017 / 19:38
1
answer

I need to make a find and replace utility in java

I need help with a util java. In the program that I am doing I need a utility of find and replace . I need it to work with text and excel documents. I can not use the program tools like notepad or the same excel...
asked by 11.05.2018 / 10:31
1
answer

the result of a different mysql replace if I do it with php or with phpmyadmin

This is my code: UPDATE basedatos.tabla SET columna= REPLACE (columna,'\\SERVER','D:xampp\htdocs') WHERE id=1 The result in phpmyadmin is D:xampp\htdocs. It is correct And in php write me \D:xampphtdo...
asked by 29.07.2018 / 19:08