Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

how to search particular string only

 
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 ]
 
Bartender
Posts: 9612
16
Mac OS X Linux 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.
 
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
 
Hey cool! They got a blimp! But I have a tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!