17 Topics

Member Avatar for
Member Avatar for bprosic

Hi, how can I use regex or string replace to add missing "p" tags to sentences without tags. I tried matching* and splitting first the whole string matching "h" and "pre" tags but dont know how to merge it. `*let regexRule = /<pre>(.|\n|\r\n)[\s\S]*?<\/pre>/g;` Example - input let someVariable = "Basket …

Member Avatar for Diafol_2
1
1K
Member Avatar for Virangya

hi, i'm developing this small seo component, i want to know how it should be done. now i'm writing seo meta tags and other tags search engines looking into the page. i'm getting the content of the page and look for the previous set of say, keywords and replacing them …

Member Avatar for Virangya
0
129
Member Avatar for Aksel

Hi :) I'm haveing a little trouble working with a string which I need to insert a substring on certain positions. Basically I'm trying to create a pagination for a wordpress site by inserting <!--nextpage--> on certain point in a content string. The content string is of various size from …

Member Avatar for mikulucky
0
793
Member Avatar for Kyle Willett

I'm doing a program that is supposed to reverse a string entered my the user using a recursive function, I almost have it solved except for one little elusive bug that I can not understand. [CODE] //****************************************************************************** //Programer: Kyle Willett //Course: CS-1513 //Program: 3 exercise 7 page 933. //Purpose: Reverse …

Member Avatar for Kyle Willett
0
209
Member Avatar for Uni

I am supposed to read a text file containing "lyrics", then format it out based on special symbols like +,-,[] and spaces. Here's the lyrics syntax: [B]Spaces are significant:[/B] A single space between two words makes the two words go in two successive beats. Each additional space causes the lyric …

Member Avatar for Uni
0
126
Member Avatar for kweigand

I am creating methods that will extract info out of a text file. The program is for a real estate office manager who needs to run reports on property listings. The text file will contain property number, property type, price, and agent id as follows. [CODE]110001 commercial 500000.00 101 110223 …

Member Avatar for ~s.o.s~
0
667
Member Avatar for Spillman

I'm a new at C++ and need some help with this code. I searched but maybe because I'm not familiar with the correct vocabulary for C++, I couldnt' find an answer for this. What I'm trying to do is pass a string into a function that is looking for an …

Member Avatar for Spillman
0
231
Member Avatar for chad33

[CODE]import java.io.FileReader; import java.util.Scanner; public class diverScores { public static void main(String[] args) { Scanner kb = new Scanner(System.in); double [] score = new double [8]; double totalScore = 0.00; Scanner fileScanner=null; try{ fileScanner= new Scanner(new FileReader("divingdata.txt")); }catch(Exception e) { System.out.println("Input file not found"); System.exit(1); } while(fileScanner.hasNext()) { String fileLine …

Member Avatar for JamesCherrill
0
244
Member Avatar for denkfix

Hi, I use the stl features to deal with string conversions, especially facets. Now, I am faced with the task to lower a string except its first letter. Please note that I am dealing with multi-byte characters and so I cannot simply replace the first character of the string with …

Member Avatar for denkfix
0
216
Member Avatar for ndiiie

Hi all, I want to ask a question about replacing specific word in a string for example I have a string of: input = a fast nope e i want to replace word "a", if I use method replace which is: input.replace("a", "hello"); the character a in fast will also …

Member Avatar for dononelson
0
181
Member Avatar for jacksparrow01

how wud you write a code that wud convert a string of any input into a cool X formation for example if you had a string "names" how would you write it in the formation: [CODE][I]n n a a m e e s s[/I][/CODE] Or for example if you had …

Member Avatar for jacksparrow01
0
169
Member Avatar for diedie

hello all. I'm relatively new here. and very much a newbie in c++, string manipulation. I couldn't solve this. it has taken me soooo long. I did search the entire forum and google but those solutions seem a bit advance for my string problem. I know this is just basic, …

Member Avatar for WaltP
0
181
Member Avatar for moorekwl92

Hey i'm [B]trying[/B] to write code for a word utility program for a uni project and it is bugging the hell out of me. [CODE]#include <stdio.h> #include <string> #include <iostream> #include <fstream> #include <Windows.h> #include <string.h> #include <cctype> #include <algorithm> #include <vector> using namespace std; const int size=300; int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,i1,option,Mirrorimage,spacenumber=0,characternumber=0,averagelength=0,Uppercase; …

Member Avatar for rubberman
0
165
Member Avatar for programmer4life

I'm currently working on this course assignment and I'm trying to set up code to search within a database file (really its just a text file named a1.db). I hear we can use the popen function to implement shell code within a C program so here's what I tried: ---------------- …

Member Avatar for chrjs
0
696
Member Avatar for Hakoo

Hello all, I am retrieving data from servlet to midlet. Now coming data is whole string. but now I want to chop it into different words. here my code is : [CODE] HttpConnection conn = (HttpConnection) Connector.open(url); StringBuffer sb = new StringBuffer(); conn.setRequestMethod(HttpConnection.GET); conn.setRequestProperty("Content-Type", "Application/x-urlformencoded"); InputStream is = conn.openInputStream(); byte[] …

Member Avatar for Hakoo
0
597
Member Avatar for shawn130c

Hi all, I have been playing around with trying to create an english to pig latin translator. I am not really sure where to start, so right now I am just focusing on splitting a string and search for "A", if the word has "A" add "way" to the end …

Member Avatar for codeorder
0
932
Member Avatar for RenanLazarotto

Hey guys! How can I invert (or reverse, whatever) a string, but reversing each word? Like: [ICODE]This is a string.[/ICODE] Output: [ICODE]sihT si a gnirts.[/ICODE] and not: [ICODE].gnirts a si sihT[/ICODE] Also, how can I do it to a entire file? Thanks in advance!

Member Avatar for codeorder
0
2K

The End.