Hi People,
Just need your help regarding a task to search in Java. I need to read a line from a file and make a list of all the words that have more than 1 capital letter in them.
For example if the line is : There are SeVen Planets In this UniverSe
The result should be : SeVen and UniverSe
I am able to read the line by splitting it into words but some how not able to use the correct regular expression to search for these words.
The following is a small example I used but it returns false although I think it should return true.
System.out.println("ThiS".matches("[A-Z]{2,}"));
Can anyone please have a look at this and suggest ways to achieve my result? Appreciate any help.
Thanks,
AJ