Posts Tagged with replace

Displaying 1-5 of 5 results.
Resolved: Replace %2C with a comma in javascript?
posted by admin on June 18, 2016
I get string from URL

#&q=car&category=Car%20Audio%2CAccessories&brand=

%2C is comma in url, and I want to recover my string with comma

#&q=car&category=Car%20Audio,Accessories&brand=
Read more
Resolved: JavaScript replace or remove words from string using one function
posted by admin on April 23, 2016
I have string and I want to replace or remove words combination. Not one by one, not using

str = str.replace("green", "red");
str = str.replace("blue", "red")
etc...


I want something like

str.function("words combination", "red")
Read more
Resolved: PHP Regex Remove special chars, symbols from string, allow only comma and space
posted by admin on March 27, 2016
I have tags on my blog.
Tags format, which user write is like

one, two, three, four, five, six, seven, 11887, ... etc


I want to protect my tags, and exclude situations like

#asdad, asdsad#adsd, ***m,
Read more
Resolved: PHP replace words in string array without case sensitive
posted by admin on March 11, 2016
I want to replace words in array string, only single word, without contains in another word, only, when the word in format SPACE+WORD+SPACE.

For example

$string = ['Москва — город герой!', 'москва не резиновая', 'москватека не резиновая', 'текамоскватека не резиновая', 'текамосква не резиновая'];


I want to replace all "Москва", and "москва" to Moscow, and get result output like

Array ( [0] => Moscow — город герой! [1] => Moscow не резиновая [2] => москватека не резиновая [3] => текамоскватека не резиновая [4] => текамосква не резиновая )
Read more
Resolved: PHP replace php start and end tags to lt gt
posted by admin on December 22, 2015
I want to replace <?php and ?> symbols to lt gt html special charectersRead more