41 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for joshl_1995

Hello Daniweb Community, I was wondering if there is a way to replace words from a listbox. So at the moment I've got a listbox with a couple of strings to be replaced in the textbox, however single line listbox items work but when I add a multi-lined item eg. …

Member Avatar for joshl_1995
0
331
Member Avatar for Tinnin

Hi All, I'm trying to remove the <head> tag and contents from some html but I'm having no luck. The <head> portion of the html is: <head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style><![endif]--><title>Resume (Origin design)</title><style><!-- /* Font Definitions …

Member Avatar for diafol
0
257
Member Avatar for grakovski

Hello there, I got forum (phpbb3) and i have topics with a lot of links, like this: <a href="link..." class="postlink">Link name...</a> in every link i have class="postlink" and i want to add rel="nofollow" for every external link except my domain by check the 'href' definition. Its possible with only preg_replace …

Member Avatar for grakovski
0
426
Member Avatar for grakovski

Hello! I have some i like this: `<i class="pcon" style="background-image: url(./styles/SkyBoot/imageset/topic_unread.gif); background-repeat: no-repeat;">` I want to change only this: `styles/SkyBoot/imageset` to this: `styles/SkyBoot/imageset/black` Because i have cookies and i want to create second template. I want this to change images for my black template (second theme) I try with: `jQuery('.pcon').each(function(e) …

Member Avatar for grakovski
0
402
Member Avatar for nouth

how to `.replace()` the `'error'`? only use `a` and `b` var str = 'bla bla anything error anything bla bla'; var a = 'anything', b = a; im not good with regular expressions so im asking for how to do this with variables so i can set them up all …

Member Avatar for diafol
0
6K
Member Avatar for Szabi Zsoldos

Hey guys, I am having some difficulties regarding a select query logic. Then I have a table with products and it has a column -> submodel with all kind of data in it. ![3bcf9a8dac9e8218c88209198e26a7e5](/attachments/small/2/3bcf9a8dac9e8218c88209198e26a7e5.png "align-left") What I want to achieve is to **STRIP** (with REGEXP?) all the strings starting with …

Member Avatar for Szabi Zsoldos
0
728
Member Avatar for blueguy777

$a = array(000,400,000,500); $b = array(300,400,450,500); $i=0; foreach($b as $k=>$v) { if($v==$a[$i]) { $b[$k]='000'; } $i++; } print_r($b); i want same thing in two dimensional array $a = Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) [1] => Array ( [0] => …

Member Avatar for blueguy777
0
326
Member Avatar for blueguy777

Array1 = array(000,400,000,500) Array2 = array(300,400,450,500) if the values of Array1 matches with Array2 values then the matching values of Array2 should be replaced with 000 i.e. Array2 = array(300,000,450,000) somebody help me. thanks in advance

Member Avatar for blueguy777
0
239
Member Avatar for mario90

hello i have this little image script that work on greasamonkey, the script is good and work like a charm it help me to block images i dont want to see but i wished it has interval timer becasue i run it over site with dynamic content ..the targeted pics …

Member Avatar for mario90
0
210
Member Avatar for Angelrawzz

Hi, I am trying to create a function which takes two chars and a char* string. Then run the function and replace each occurence of Char1 with char 2. E.g. String = Apples. Char 1 = A. Char 2 = B. Char 1 is present in string so replace all …

Member Avatar for deceptikon
0
602
Member Avatar for Jahliah

Is it possible to replace commas and spaces with commas in c#? I'm fresh in c# and am looking for guidance. Any help is appreciated! **Before:** Deleting 11 files.ABC: Total Time = 01:16:30, Remaining Time = 00:00:00 **After:** Deleting,11,files,ABC: Total,Time,01:16:30,Remaining,Time,00:00:00

Member Avatar for Ketsuekiame
0
4K
Member Avatar for mpc123

Hi I have an issue where by I have lots of products in a field which are comma delimited I want to replace those product words with a id number that I have in a different table. I currently use FIND INSET to replace a tab to the comma but …

Member Avatar for mpc123
0
212
Member Avatar for nouth

So I have a string of the English alphabet for example. But I don't know the alphabet very well but I do know that it starts with "abc" and that it ends in "xyz". I want to remove letters "b" to "x". I want to do something like `str = …

Member Avatar for nouth
0
2K
Member Avatar for ivanichi

Assuming i have $a='1024,1025,0000|1020,0000|'; $b='1024,1025,0000,1020,0000,'; i want replace commas (,) in $b with (|) so that $b is equal to $a like this $b='1024,1025,0000|1020,0000|'; if i use $ob=str_replace("0000,","0000|",$b); echo $ob; output works : 1024,1025,0000|1020,0000| But, how to make it with PHP where did i put that this refers to the …

Member Avatar for ivanichi
0
255
Member Avatar for magicmarkuk

Hi I have a site built on Wordpress which has a over 4,000 posts all with the suffix -2 at the end of the post name (due to me forgetting to clear the trash) before running an import). I would like to remove the -2 from the post names with …

Member Avatar for magicmarkuk
0
279
Member Avatar for joshl_1995

Hello Community, I was wondering if there is a way to replace a cell value from one excel spreadsheet and save it as another spreadsheet but with the replaced cell value. Please Help

Member Avatar for joshl_1995
0
1K
Member Avatar for jamojo

Hello Everyone. Can you please advise how can I replace a string from this "[" to "]" this character and replace it with blank string? I believe I will use str_replace but I am having a hard time doing this. The quick brown fox jumped over [caption id="attachment_223" align="alignleft" width="900"] …

Member Avatar for jamojo
0
161
Member Avatar for zeeters

I have to write a program that takes a word from the user and replaces it if it is in the text file with another word given by the user. Then takes that input and writes it to a new file. The only problem is, I have to do it …

Member Avatar for zeeters
0
3K
Member Avatar for ggeoff

Hi I have, almost in a panic, realised that I have some hard drives that need to be replaced as they are 6 years old. Although I have had no issues with them I thought replace them before they fail. It still seems a shame that a working hard drive …

Member Avatar for sheikhali449
0
1K
Member Avatar for guilherme.carvalho.9250

Hello to everyone, Im a beginner in vb.net and currently Im developing a "reminder" program, the user inserts a task that he as to do, the date and the time to be remimbered! Im saving the task in a txt file like this, "Make dinner,Reminder,24-07-2012 18:31:00", but line by line, …

Member Avatar for guilherme.carvalho.9250
0
2K
Member Avatar for iFrolox

Well i'll try to be clear as possible, i'm making like an account organizer (helper/tool) w.e you wanna call it, and for example i have 10 accounts. I want to delete account #5 (They are array), what i need it to do is move account #6, 7, 8, 9 & …

Member Avatar for iFrolox
0
2K
Member Avatar for heinlein_

Hi, I have a little problem. I want to replace words in a text, but only 'whole words'. That is, I'm looking for a method that changes "cat", but not "catfood". I know how to do it using re.sub, like this: re.sub(r'\bword\b', 'change', text) Only problem is, I'm using a …

Member Avatar for heinlein_
0
7K
Member Avatar for FelineHazard

Hi all, I am doing some c++ exercise about operator replacing. I have successfully replaced the + (plus) operator to work on a user-defined class. I understand these operators are order-sensitive: need to replace the operator for (class+int) and for (int+class). Thus, creating **two** replacements that do exactly the same. …

0
147
Member Avatar for winky

Been a long time since I've logged in and had a question, but here goes nothing! I have a file that is not delimited in any way, but I need to replace a particular column character from a space to a alphanumeric value on every other line starting at line …

Member Avatar for winky
0
460
Member Avatar for aldrin_ison1

Hi! I'm new to C and I'm having some problems in my program. It opens a .txt file then copies this to another .txt file but replaces a certain word with another word. It uses command line arguments. Example: //inside text.txt love is patient love is kind ... ./change love …

Member Avatar for histrungalot
0
452
Member Avatar for dwayned

Hi Guys, I have imported a CSV file into the database and i want to write some functions to ensure that when data is loaded in that all spaces are removed from certain columns. For Example: In the Phone No column the numbers can appear as follows 07712345678 077 1234 …

Member Avatar for dwayned
0
166
Member Avatar for friknos

hi i am trying to create a dvd rental system, up till now i have entered the client's details into an array list and have created a loan for every client that rented a dvd. But now i need to edit a part of this loan, for eg i need …

Member Avatar for friknos
0
134
Member Avatar for Lillylionhert
0
114
Member Avatar for november_pooh

Hi masters, I want to replace a string with another string in textbox How i can do this? Please help Thank you

Member Avatar for ChrisPadgham
0
227
Member Avatar for jshenn

I am working on a bowling scoring system for a non-profit. They would like to be able to enter up to 9 games worth of scores into a form and have the shot results and game scores captured in a database. I have accomplished the scoring part with an html …

Member Avatar for jshenn
0
159

The End.