★★ Java の宿題ここで答えます Part 68 ★★at TECH
★★ Java の宿題ここで答えます Part 68 ★★ - 暇つぶし2ch54:デフォルトの名無しさん
09/07/27 22:13:30
>>53
import java.util.regex.*;
public class GoogleKeyword {
public static void main(String[] args) {
Pattern p = Pattern.compile("(?:\\?|&)q=(.*?)(?:&|$)");
Matcher m = p.matcher("URLリンク(www.google.co.jp)キーワード&lr=lang_ja&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja:official&client=firefox-a");
if(m.find()) System.out.println("keyword="+m.group(1));
else System.out.println("not found");
}
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch