I have as input text a big html file from where I have to extract some information using pattern matching. The "region" is somehow as follows:
some html text
<div debugState" style="display: none;">
Model: ModelCode[BR324]
Features: [S08TL, S0230, S0851, S0428, S01CD, S0879, S01CA, S08SP, S0698, S01CB, S0548, S08SC, S08TM, S01CC, S0801, S0258, P0668, S04AK]
Packages: [S0801]
</div>
some html text
I wrote the following code. (At debInfo) is the html source to be scanned. Due to
Pattern model = Pattern.compile(".*(Model: ModelCode\\[\\w\\]).*, Pattern.DOTALL");
Pattern features = Pattern.compile(".*(Features: \\[\\w*\\]).*, Pattern.DOTALL");
Pattern packages = Pattern.compile(".*(Packages: \\[\\w*\\]).*, Pattern.DOTALL");
Matcher m1 = model.matcher(debInfo);
Matcher m2 = features.matcher(debInfo);
Matcher m3 = packages.matcher(debInfo);
boolean a = m1.matches();
boolean b = m2.matches();
boolean c = m3.matches();
System.out.println("matches(); " + a + " " + b + " " + c + " " + "\n" + debInfo);
and I am getting no match :-(. What am I doing wrong? Thanks in advance (a lot!)