A buddy of mine is currently tinkering around with JpCap in Java and we found some interesting (maybe?) problem regarding regular expressions in Java.
Only HTTP traffic is being captured and subsequently analyzed. For this purpose he is using a pattern like this one:
Pattern p = Pattern.compile("(www)");
But what both of us have not been able to find out: why does the above pattern produce no matches at all, while the following does:
Pattern p = Pattern.compile(".*(www).*");
For what I can see, both of these should be identical, shouldn't they? I don't have that much experience regarding regular expressions, so there might be a very simple answer to this question :)