java - check if string ends with certain pattern
- by The Learner
I have string like:
This.is.a.great.place.too.work.
(or)
This/is/a/great/place/too/work/
than my java program should give me that the sentence is valid and it has "work".
if i Have :
This.is.a.great.place.too.work.hahahha
(or)
This/is/a/great/place/too/work/hahahah
Should not give me that there is a work in the sentance.
so I am looking at java strings to find a word at the end of the sentance having . (or),(or)/ before it. How can I achieve that