public static String replaceWithWikiLink(String wikitext)
			throws IOException {
		String linkurl;
		String linktext;
		String backword;
		String tail = "";
		Matcher m;
		while ((m = p_link.matcher(wikitext)).find()) {
			if (m.group(5) == null) {
				linkurl = URLEncoder.encode(m.group(3), "UTF-8");
				linktext = m.group(4);
			} else {
				linkurl = URLEncoder.encode(m.group(5), "UTF-8");
				linktext = m.group(5);
			}
			linkurl = linkurl.replace("*", "%2A");
			linkurl = linkurl.replace("~", "%7E");
			linkurl = linkurl.replace("+", "%20");
			wikitext = m.group(1);
			backword = m.group(6);

			tail = "<a href=\"http://ja.wikipedia.org/wiki/" + linkurl + "\">"
					+ linktext + "</a>" + backword + tail;
		}
		wikitext = wikitext + tail;
		return wikitext;
	}