I am having difficulty with using \b
as a word delimiter in Java Regex.
For
text = "/* sql statement */ INSERT INTO someTable";
Pattern.compile("(?i)\binsert\b");
no match found
Pattern insPtrn = Pattern.compile("\bINSERT\b");
no match found
but
Pattern insPtrn = Pattern.compile("INSERT");
finds a match
Any idea what I am doing wrong?