buffer.append((char)'\\');
buffer.append('\\');
    static String stripExtendedComment(String regex) {        int len = regex.length();        StringBuffer buffer = new StringBuffer(len);        int offset = 0;        while (offset < len) {            int ch = regex.charAt(offset++);                                                // Skips a white space.            if (ch == '\t' || ch == '\n' || ch == '\f' || ch == '\r' || ch == ' ')                continue;            if (ch == '#') {                    // Skips chracters between '#' and a line end.                while (offset < len) {                    ch = regex.charAt(offset++);                    if (ch == '\r' || ch == '\n')                        break;                }                continue;            }            int next;                           // Strips an escaped white space.            if (ch == '\\' && offset < len) {                if ((next = regex.charAt(offset)) == '#'                    || next == '\t' || next == '\n' || next == '\f'                    || next == '\r' || next == ' ') {                    buffer.append((char)next);                    offset ++;                } else {                        // Other escaped character.                    buffer.append((char)'\\');                    buffer.append((char)next);                    offset ++;                }            } else                              // As is.                buffer.append((char)ch);        }        return buffer.toString();    }