Results 1 to 3 of 3
Thread: Output correct grammar
- 03-05-2009, 11:43 PM #1
Member
- Join Date
- Jan 2009
- Posts
- 37
- Rep Power
- 0
Output correct grammar
I have a string like this:
"this is a cool string . and another cool segment of the same string . "
As you can see the periods have an extra space I need to change that too:
"this is a cool string. and another cool segment of the same string."
I tried
String=String.replaceAll(" . ", ". ");
But that doesn't work it also replaces all the a's in the string, not sure why, I think it has something to do with the Hex values or something like that or I need to use Regular Expressions.
Any help would be appreciated.
Thanks
- 03-06-2009, 12:15 AM #2
why not reply to your other post first before starting a new one? Have a period in string, how to make it look nicer
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 03-06-2009, 12:22 AM #3
Member
- Join Date
- Jan 2009
- Posts
- 37
- Rep Power
- 0
Similar Threads
-
Java, output string, getting correct output? HELP!
By computerboyo in forum New To JavaReplies: 2Last Post: 02-25-2009, 11:44 PM -
Please suggest me the correct approach!
By rjuyal in forum Advanced JavaReplies: 6Last Post: 05-05-2008, 02:54 PM -
Is my Pseudocode correct?
By Clemenza1983 in forum New To JavaReplies: 0Last Post: 01-29-2008, 04:07 AM -
To correct forum
By Jman in forum IntroductionsReplies: 3Last Post: 01-18-2008, 02:33 AM -
Correct Number formatting
By paul in forum New To JavaReplies: 1Last Post: 08-07-2007, 04:59 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks