Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Help with searching numbers

Thread view: 
Vishwas - 16 Jun 2005 12:20 GMT
i have a problem, i have to a string of characters starting with
numbers, i have to search for this no and whenever a no is encountered
put a newline before it so tht all the strings starting with no r on a
new line. plz help for this code
Andrew Thompson - 16 Jun 2005 12:40 GMT
> i have a problem, i have to a string of characters starting with
> numbers, i have to search for this no and whenever a no is encountered
> put a newline before it so tht all the strings starting with no r on a
> new line.

<http://home.earthlink.net/~patricia_shanahan/beginner.html>

>..plz help for this code

It does not generally work the way you might be
thinking, so I will explain.

- people here will not provide you with the answer, though
they may be willing to help.
- It is best to supply some code (even code that does not
compile) and a single question.
- the best group for beginner questions can be found here..
<http://www.physci.org/codes/javafaq.jsp#cljh>
- if you have not done it already, do a 'HelloWorld' program.

HTH

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

Remon van Vliet - 16 Jun 2005 13:11 GMT
Example :

yourString.replace(Integer.toString(yourNumber),  '\n' +
Integer.toString(yourNumber));

Be careful that you're not trying to replace number 14 if numbers such as
144 are also in there. If the numbers are seperated by delimiters make sure
you add those to the search expression.

All that said, this is very basic functionality easily found in the Java
docs, you may wanna consider browsing that before you post questions here.
Just a thought ;)

Remon van Vliet

> i have a problem, i have to a string of characters starting with
> numbers, i have to search for this no and whenever a no is encountered
> put a newline before it so tht all the strings starting with no r on a
> new line. plz help for this code
John Currier - 17 Jun 2005 00:46 GMT
It looks an awful lot like someone's homework assignment....someone who
has been spending too much time instant messaging.

John


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.