This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
HTTPS,
HTTPC, // // (ht|f)tp(s?)
HTTPCS, // (ht|f)tp(s?):/
FI,
FIL,
FILE,
END // (ht|f)tp(s?)://
}
continue OUTER;
break;
case 'i': //NOI18N
if (state == STATE.F) {
state = STATE.FI;
case 'l': //NOI18N
if (state == STATE.FI) {
state = STATE.FIL;
case 'e': //NOI18N
if (state == STATE.FIL) {
state = STATE.FILE;
case 'p': //NOI18N
if (state == STATE.HTT_FT) {
state = STATE.HTTP_FTP;
case ':': //NOI18N
if (state == STATE.HTTP_FTP || state == STATE.HTTPS) {
if (state == STATE.HTTP_FTP || state == STATE.HTTPS || state == STATE.FILE) {
state = STATE.HTTPC;
return result;
private static final Pattern URL_PATTERN = Pattern.compile("(ht|f)tp(s?)://[0-9a-zA-Z/.?%+_~=\\\\&$\\-#,:]*"); //NOI18N
private static final Pattern URL_PATTERN = Pattern.compile("(ht|f)(tp(s?)|ile)://[0-9a-zA-Z/.?%+_~=\\\\&$\\-#,:]*"); //NOI18N
public static Iterable<int[]> recognizeURLsREBased(CharSequence text) {
Matcher m = URL_PATTERN.matcher(text);
performTest(" http://hudson.gotdns.com/wiki/display/HUDSON/Structured+Form+Submission\n", 4, 75);
performTest(" https://hudson.gotdns.com/wiki/display/HUDSON/Structured+Form+Submission\n", 4, 76);
performTest(" ht+tp://hudson.gotdns.com/wiki/display/HUDSON/Structured+Form+Submission\n", null);
performTest(" file:///C:/CodeSourceryG++Lite/share/doc/arm-arm-none-eabi/html/getting-started/sec-cs3-startup.html", 4, 104);
@Test