• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to search particular string only

 
shinu pillai
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam reading a following part of file and write to another file... iwant to handle this code.....as single line


from the above program....... iwant output PARTIAL_PASS.I use delimiter as<edm:code> but it takes only first occurence therfor i got output as update only.Can any body helpme wht changes done in abobve code.I only want to change existing code...not ready to use XML parser.please can any body help me....


linei could not want all output like

<edm:code>update</edm:code>.But iwant out put inside <edm:orderTransactionResult>----

--------------------
</edm:orderTransactionResult>
<<edm:orderTransactionResult><edm:code>PARTIAL_PASS</edm:code></edm:orderTransactionResult>
therfor i used following in code

if((logging)&&(line.indexOf("</edm:orderTransactionResult>")>-1))
please help me....
my requirtement is as output as
PARTIAL_PASS

[Added code tags, removed smilies - Dave]
[ October 24, 2006: Message edited by: David O'Meara ]
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Shinu. Please use code tags and disable smileys when you post. Your question is nearly unreadable with the code mixed in with your comments.
 
Naveen Raja
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can't you make use of Pattern and Matches classes for String search
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!