I have a large array with string. Now, I need to use the string in the array to form patterns. However for the string with round brackets, the constructed patterns don\'t work.
Because in line String text = "Student (male): John"; does not match with regex student \(male\)\:\s\w+
String text = "Student (male): John";
student \(male\)\:\s\w+
Replace input text with text = "student (male): John"; or first phrase strings to phrases[0] = "Student (male)";
text = "student (male): John";
phrases[0] = "Student (male)";
Example on Ideone