• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to find a particular word that match from the pattern matching in Java  RSS feed

 
deepika deepi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

I have a pattern matching code. the code is working fine. I want to find the particular key word that matched with the sentence. for example in this i want to display the word "Tim" alone stating that the key word that match is Tim. How to display that

the code is

how to make such output display?
 
R. Jain
Ranch Hand
Posts: 375
1
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just match it with "Tim". It will give you the result. You don't need that long regex for that..

You can see ResourcesOnRegularExpressions for help.
 
deepika deepi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
R. Jain wrote:Just match it with "Tim". It will give you the result. You don't need that long regex for that..

You can see ResourcesOnRegularExpressions for help.


ya i know that. but if the sentence is like this



i have Jackey, Tim, tim. i want to know that out of four regular expression. three are used as key words. so i want to display that. Hope i am clear! thank's for the tutorial.
 
R. Jain
Ranch Hand
Posts: 375
1
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deepika deepi wrote:
R. Jain wrote:Just match it with "Tim". It will give you the result. You don't need that long regex for that..

You can see ResourcesOnRegularExpressions for help.


ya i know that. but if the sentence is like this



i have Jackey, Tim, tim. i want to know that out of four regular expression. three are used as key words. so i want to display that. Hope i am clear! thank's for the tutorial.


Yeah you are almost clear..
But you can take a look in tutorials.. They will help. and you will know a lot more things about Regex
 
deepika deepi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya.. thank you Jain .. I got it. i just didn't tried out the last step what was necessary
 
R. Jain
Ranch Hand
Posts: 375
1
Java Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
deepika deepi wrote:ya.. thank you Jain .. I got it. i just didn't tried out the last step what was necessary


Good..
And would you please post that last step you took, here.. It may help other viewers in future..
 
deepika deepi
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya sure ..


  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!