blob: 91ef4d5d8cd034fdc199d9ef9524b6d58eaafd07 [file] [log] [blame]
david_williams75261a82010-04-22 05:50:25 +00001"test\\".matches(".*" + "\\\\" + " *" + "$")
2
3char CR = 0x0d;
4char LF = 0x0a;
5String testeols="" + CR + LF + CR + LF + LF;
6byte[] testconvert = testeols.getBytes("UTF8");
7
8System.out.println(testeols);
david_williams201ad5d2010-04-23 07:59:07 +00009
10|':'|'\u0020'|'\u0009'|'\u000C'";
11
12*'='.*$";
13
14String ANY_NONEOL_WHITESPACE = "[ \\t\\f\\x08]*";
15String ANY_END = ".*$";
16String ONE_PROPERTY_DELIMITER = "[=:]";
17
18String LICENSE_KEY = "^" + ANY_NONEOL_WHITESPACE + "license" + ANY_NONEOL_WHITESPACE + ONE_PROPERTY_DELIMITER + ANY_END;
19
20String testString = "license=test";
21System.out.println(testString + " " + testString.matches(LICENSE_KEY));
22
23testString = " license = test";
24System.out.println(testString + " " + testString.matches(LICENSE_KEY));
25
26testString = " license = test";
27System.out.println(testString + " " + testString.matches(LICENSE_KEY));
28
29testString = " license = test";
30System.out.println(testString + " " + testString.matches(LICENSE_KEY));
31
32testString = " license = \\\n test";
33System.out.println(testString + " " + testString.matches(LICENSE_KEY));
34
35testString = " xx license = test";
36System.out.println(testString + " " + testString.matches(LICENSE_KEY));
37
38
39