File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Customer Requirements for Developers
this week in the
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
. There is also a
Sun Tutorial on Regular Expressions in Java
I agree. Here's the link:
Using split method with String
is that any utility class that help compare date within start and end date ?
Threads: sleep() !
How to use Delimter
Split function of String class
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015