Sees if buf is of the form [optional anything][keyword][optional whitespace]. It won't allow keyword to be directly preceded by an alphanumeric, _, or &. Will be different if keyword contains regex codes.
(final String keyword)
| 385 | * Will be different if keyword contains regex codes. |
| 386 | */ |
| 387 | private boolean bufEnds(final String keyword) { |
| 388 | return Pattern.matches("^.*(?<![a-zA-Z0-9_&])" + keyword + "\\s*$", buf); |
| 389 | } |
| 390 | |
| 391 | |
| 392 | /** |