Is it possible to insert contents of a variable in a regular expressions.
Example:
String test = " This is the book of ABC's of java";
String variable = "abc";
String REGEX = "\\bvariable\\b";
so finally REGEX = "\\babc\\b"; i.e to check if abc is in test string.
Thanks in advance