Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Help with searching numbers

Reply
Thread Tools

Help with searching numbers

 
 
Vishwas
Guest
Posts: n/a
 
      06-16-2005
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

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      06-16-2005
On 16 Jun 2005 04:20:20 -0700, Vishwas wrote:

> 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

--
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
 
Reply With Quote
 
 
 
 
Remon van Vliet
Guest
Posts: n/a
 
      06-16-2005
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

"Vishwas" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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
>



 
Reply With Quote
 
John Currier
Guest
Posts: n/a
 
      06-16-2005
It looks an awful lot like someone's homework assignment....someone who
has been spending too much time instant messaging.

John

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Google search result to be URL-limited when searching site, but notwhen searching Web stumblng.tumblr Javascript 1 02-04-2008 09:01 AM
Fibonacci Numbers and Lucas Numbers Andrew Tatum C++ 6 05-27-2007 12:47 AM
Finding 1000 largest numbers from a file having some billion numbers Subra C Programming 25 03-08-2007 01:31 AM
Frame Numbers vs. JPEG Numbers With CF Cards mort Digital Photography 3 02-16-2005 01:43 AM
Array sort function sorts on chars not numbers ... help ! how to sort numbers GIMME Javascript 5 07-26-2004 01:28 AM



Advertisments