17 Topics
|
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
[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 … |
|
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 … |
|
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 … |
|
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 … |
|
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, … |
|
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; … |
|
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: ---------------- … |
|
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[] … |
|
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 … |
|
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! |
The End.