I need to search for instances of a character sequence in a Java string using Eclipse. Is there an easy way or regex to do this?
Example:
Search for Eggs should match
String str = "Eggs and toast."
and not match
Eggs e = new Eggs()
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Would something like this work for you?