1 | else if (this == Token.token_wordchars)↵ | | 1 | else if (this == Token.token_not_wordchars)↵
|
2 | ret = "\\w";↵ | | 2 | ret = "\\W";↵
|
3 | else if (this == Token.token_spaces)↵ | | 3 | else if (this == Token.token_not_spaces)↵
|
4 | ret = "\\s";↵ | | 4 | ret = "\\S";↵
|
5 | else {↵ | | 5 | else {↵
|
6 | StringBuffer sb = new StringBuffer();↵ | | 6 | StringBuffer sb = new StringBuffer();↵
|
7 | sb.append("[");↵ | | 7 | sb.append("[^");↵
|
8 | for (int i = 0; i < this.ranges.length; i += 2) {↵ | | 8 | for (int i = 0; i < this.ranges.length; i += 2) {↵
|
9 | if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0) sb.append(",");↵ | | 9 | if ((options & RegularExpression.SPECIAL_COMMA) != 0 && i > 0) sb.append(",");↵
|
10 | if (this.ranges[i] == this.ranges[i+1]) {↵ | | 10 | if (this.ranges[i] == this.ranges[i+1]) {↵
|
11 | sb.append(escapeCharInCharClass(this.ranges[i]));↵ | | 11 | sb.append(escapeCharInCharClass(this.ranges[i]));↵
|
12 | } else {↵ | | 12 | } else {↵
|
13 | sb.append(escapeCharInCharClass(this.ranges[i]));↵ | | 13 | sb.append(escapeCharInCharClass(this.ranges[i]));↵
|
14 | sb.append('-');↵ | | 14 | sb.append('-');↵
|
15 | sb.append(escapeCharInCharClass(this.ranges[i+1]));↵ | | 15 | sb.append(escapeCharInCharClass(this.ranges[i+1]));↵
|
16 | }↵ | | 16 | }↵
|
17 | }↵ | | 17 | }↵
|
18 | sb.append("]");↵ | | 18 | sb.append("]");↵
|
19 | ret = sb.toString();↵ | | 19 | ret = sb.toString();↵
|
20 | | | 20 |
|