• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

looking for java parasers for parsing string expressions

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am looking for java parasers for parsing string expressions.
could pls someone tell me about few good java parsers for parsing a string.
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
u can pars object of any class into its child class ....
but here ur question is quite ambigous to understand actually...
what is ur requirment....
explain ur requirment first
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
u could provide a bit more info regarding wot u wanna parse exactly. hav u tried using string tokenizers?
for example, if i define a string as follows:
String expr="<HTML> <H1> parse this </H1> </HTML>";
-say i wanna parse this and extract from it each of the html tags, say <HTML>, then i create a string tokenizer:
StringTokenizer tokens = new StringTokenizer(expr);
-to get the first token or sub-string <HTML>, i just say:
Sting html=tokens.nextToken();
-so u could hav a loop which prints all the sub strings:
while(tokens.hasMoreElements())
{
System.out.println(tokens.nextToken());
}
-hope this helps.
neamz
 
Neaman Shafiq
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry about the way my answer has come out. i used a string expression which had html tags in it. the browser has outputted these in HTML - this wasnt my intention. maybe i picked a bad example...
neamz
 
Oni Anand
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
thanks to everyone for their responses.....
you all are real helpful
tx
AA
 
reply
    Bookmark Topic Watch Topic
  • New Topic