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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "substring problem" Watch "substring problem" New topic
Author

substring problem

preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi,

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.

Thanks.
Ranjana Patil
Greenhorn

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


if(channel.startsWith("SIP")==true)
{
String channel2=channel.substring(0,16);
}


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: substring problem