A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Mar 02, 2005
Mar 16, 2005 18:44:00
I want to be able to split a
, for example;
Hello there\\end1 my dear\\end2
Basically, the tokens are \\end1 and \\end2.
I've looked at the
and split, but the delimiter is, even though a string, treats every character in the string a a delimiter. If I use "\\" as the argument, then it will also print the "end1" and "end2".
amerzil co-ed student<br />"Praise be the Code"
Joined: Dec 17, 2003
Mar 16, 2005 20:45:00
Have you tried using a regex (regular expression) based search and replace to replace all the "\\end
" instances with a newline character? That would probably be the way to go.
If you are not familiar with regex, there's a great information site,
, that has tutorials, as well as specifics on
using Regular Expressions in Java
. There is also a
Sun Tutorial on Regular Expressions in Java
I agree. Here's the link:
How to use Delimter
Threads: sleep() !
Using split method with String
Split function of String class
is that any utility class that help compare date within start and end date ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014