aspose file tools*
The moose likes Beginning Java and the fly likes substring problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "substring problem" Watch "substring problem" New topic

substring problem

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518

From the following output:

Channel Location State Application(Data)
SIP/NBE-09749568 (None) Down (None)
1 active channel
0 active calls

I need to take SIP/NBE-09749568.How can i split this.I tried using substring,but i am unable to get what i need.please assist me to do this.

Ranjana Patil

Joined: Nov 17, 2006
Posts: 1
try with str.substring(40,56) it should work fine. Does the source String includes new lines?
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks.It is working fine by using

String channel2=channel.substring(0,16);

I agree. Here's the link:
subject: substring problem
Similar Threads
substring problem
how to check the channel count
how to split the particular datas from group of datas
taking a particular data from a number of lines
Socket program for linux