Setting up Matcher for String phrase match in file
- by randomCoder
Having trouble figuring out how to match a phrase string to a phrase in file stream. The file I'm dealing with contains random words such as:
3 little pigs built houses and 1 little pig went to the market etc. for many lines
Using "little pig" as my pattern and matcher.find() I can locate 2 matches: "little pig" and "little pigs". However, I only…