• Post Reply Bookmark Topic Watch Topic
  • New Topic

regex retrival  RSS feed

 
pradipta kumar rout
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir,

Thank you for your reply,

now i want to retrive
Example 1. pradipta from : <title>Pradipta</title>
2. xyz form : <title>xyz</title>

like this .. i want to retrive the title name..


I am using Pattern but its not working .its retriving total but i want only the title name

I am using this "\\<title>\\S+\\</title>"
but not working its shows total : <title>pradipta</title> from the corresponding line.
so i want only "pradipta" from that line.

kindly help me how to retrive this.
 
Rob Spoor
Sheriff
Posts: 21131
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look through the Javadoc of Pattern. Then choose one of the following:
- a positive lookbehind, non-greedy anything, positive lookahead
- a capturing group
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!