java´ÓÍøÒ³ÖÐÌáȡͼƬµØÖ·
import java.util.regex.Matcher;
import java.util.regex.Pattern;
1£ºÕâ¸öÊÇÄõ½Ò»¸ö×Ö·ûÈ¡µÃÀïÃæµÄͼÏñµØÖ··µ»ØÒ»¸öList
public static List<String> getImgStr(String htmlStr){
String img="";
Pattern p_image;
Matcher m_image;
List<String> pics = new ArrayList<String>();
String regEx_img = "<img.*src=(.*?)[^>]*?>"; //ͼƬÁ´½ÓµØÖ·
p_image = Pattern.compile
(regEx_img,Pattern.CASE_INSENSITIVE);
m_image = p_image.matcher(htmlStr);
while(m_image.find()){
img = img + "," + m_image.group();
Matcher m = Pattern.compile("src=\"?(.*?)(\"|>|\\s+)").matcher(img); //Æ¥Åäsrc
while(m.find()){
pics.add(m.group(1));
}
}
 
Ïà¹ØÎĵµ£º
package homework03;
import java.util.Scanner;
/*
* ±àдһ¸öÀ࣬¸ÃÀàÓÐÒ»¸ö·½·¨
* public int f£¨int a£¬int b£©{
*
* }
* È»ºó±àдһ¸ö¸ÃÀàµÄ×ÓÀ࣬ҪÇóÖØд·½·¨f()£¬¶øÇÒÖØдµÄ·½·¨½«·µ»ØÁ½¸öÕûÊýµÄ×îС¹«±¶Êý¡£ÒªÇó£º
* ÔÚÖØдµÄ·½·¨µÄ·½·¨ÌåÖÐÊ×Ïȵ÷Óñ»Òþ²ØµÄ·½·¨·µ»ØaºÍbµÄ×î´ó¹«Ô¼Êým,È»ºó½«a*b/m ......
ÎÒÓÐÒ»ÍòԪǮ£¬ÊǽèµÄ£¡ÎÒ½èÁËÕâÒ»Íò¿éÇ®×¼±¸È¥±±¾©¼ÌÐøѧϰ¡£
ÎÒÊÇÒ»¸ö´óרÉú£¬²»ÈëÁ÷ÎÒѧУ£¡ËäÈ»ÎÒÏàÐÅÒ»¸öÈ˵ÄŬÁ¦ÄܸıäÃüÔË£¡ËùÒÔÎÒÒ»Ö±¶¼ÔÚŬÁ¦µÄѧϰJAVA¼¼Êõ£¬Ï£ÍûÄÜÔÚÕâÌõ·ÉÏ×ߵĸüÔ¶£¡ÎÒÓÐÅ®ÅóÓÑ£¬¶ÔÎҺܺã¬Ò²ºÜÖ§³ÖÎÒ£¡µ«ÎÒ´Ó¸ñÁ¦¿Õµ÷´ÇÖ°£¬ÎÒ¾ÍÑ¡ÔñÁËJA ......
2. ²»Òª×öÖظ´µÄ¹¤×÷¡£
ʹÓó£¼ûµÄ¡¢¾¹ý֤ʵµÄ¿ò¼Ü£¬Èç Apache Struts¡¢JavaServer Faces ºÍ Eclipse RCP¡£Ê¹Óþ¹ý֤ʵµÄģʽ¡£
»Øµ½ÎÒÃÇ¿ªÊ¼°ïÖú¿Í»§Ê¹ÓøճöÏÖµÄ Java EE ±ê×¼µÄʱºò£¬ÎÒÃÇ·¢ÏÖ£¨ºÍÐí¶àÆäËûÈËÒ»Ñù£©£¬Í¨¹ýÖ±½ÓʹÓûù´¡µÄ Servlet ºÍ JSP ¹æ·¶¹¹½¨ UI Ó¦ÓóÌÐòÀ´¿ª·¢Óû§½Ó¿Ú¿ª·¢¿ò¼Ü£¬¿ÉÒÔ¼«´óµØÌḠ......
Debug͸ÊÓͼ
http://www.cnblogs.com/Jamesliang/archive/2010/01/09/1643188.html
µ±µã»÷Debug°´Å¥Ê±£¬Eclipse»áÌáʾÄã½øÈë Debug͸ÊÓͼ¡£¿ÉÒÔÔÚÓÒÉÏ·½Expressions´°¿Úµã»÷Êó±êÓÒ¼üÔÚµ¯³ö²Ëµ¥ÖÐÑ¡Ôñ Add Watch Expression »òÕßµã»÷ÈçÏÂͼËùʾ°´Å¥Ôò»á³öÏÖ£¬Ìí¼Ó±í´ïʽ´°¿Ú¡£Äã¿ÉÒÔÊäÈëÄã ......