How do i read the numbers between 2 #'s??

Hi,
I have a trace file and when opened in wordpad it looks something like below.
I am trying to write a java program to read the time stamp. the time stamp is #1204805344325#.
how do i get to this part #1204805344325#??
Thanks
#1.5#00145E489D04016C0001031700130074000447C39A926E35#1204805344325#XIRUN.com.sap.aii.ibrun.server.valueMapping.ValueMappingService#sap.com/com.sap.xi.services#XIRUN.com.sap.aii.ibrun.server.valueMapping.ValueMappingService#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : []#XIP#PIAFUSER #47CF6344D7D702B6000000000AB6F547#output##0#0#Error#1#/Applications/ExchangeInfrastructure/IntegrationServer#Plain###Error During value mapping
Thrown:
MESSAGE ID: com.sap.aii.ibrun.server.valueMapping.rb_ValueMapException.NO_GROUPID
com.sap.aii.ibrun.server.valueMapping.DBValMapPersistor$NoGuidException: Context = http://Product, agency = CRM_FSBP_BPP_Client_510, scheme = Product, and value = 0161 not found
     at com.sap.aii.ibrun.server.valueMapping.DBValMapPersistor.getGroupIdEx(DBValMapPersistor.java:689)

prometheuzz wrote:
dlewis1981 wrote:
If this part is constantly of fixed width "#1.5#00145E489D04016C0001031700130074000447C39A926E35#1204805344325#" then a simple substring
would be fine.I disagree.
What is easier to read:
String[] tokens = text.split("#");or
String[] tokens = {text.substring(1, 4), text.substring(6, 41), text.substring(43,68)};?
And, although theinput text might seem to be of fixed length, what if it does change at a later point?I think you misread the requirement, paticularly this line "I am trying to write a java program to read the time stamp. the time stamp is #1204805344325#."
He is only interested in the timestamp which if this if fixed width I think would be better as a simple substring. There is no
need to create an array of all tokens and check them against a regex, if this file is fixed width. That's my opinion anyway.
And, although theinput text might seem to be of fixed length, what if it does change at a later point?Ok it can change but so can other things like the delimeter which would break your code also.
Edited by: dlewis1981 on Mar 19, 2008 6:20 AM

Similar Messages

Maybe you are looking for

  • Urgent urgent...plzz

    hi, hi gurus, what is difference between service tax with credit and without credit.............. i want a create a tax code for service tax without credit... if i use this tax code what would be effects,  will the tax be added to the base amount...

  • Display Arabic Character in NetScape Navigator

    Hi I am using Oracle Forms & Reports 10g R2. I call a report through a button in that report there are English and Arabic Character. When i see report in Netscape Navigator 9 English character show fine but Arabic Character does not showing properly.

  • IPhoto keeps quitting

    iPhoto keeps quitting on me. I can't even add a new album and it quits. I've tried every remedy that I know of to solve the problem: 1. Rebuild library 2. Memory test 3. Reinstall 4. New library Does anybody know how to solve this? This is what the r

  • Change to uk spelling

    How do I change the default spelling dictionary to UK?

  • Audio Interface with Seamless IMac Compatiblity?

    Dear List, I thought I submitted this question before but I couldn't find it in my stuff, and can't find exactly the same question in here by searching so here goes and sorry if it's repetitive.  I currently use an M-Audio, Fastrack Ultra as my inter