ÊÕ¼¯µ½µÄjava ÕýÔòÑéÖ¤
Java´úÂ룺
import java.util.regex.*;
public final class RegExpValidator
{
/**
* ÑéÖ¤ÓÊÏä
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean isEmail(String str)
{
String regex = "^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
return match(regex, str);
}
/**
* ÑéÖ¤IPµØÖ·
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean isIP(String str)
{
String num = "(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)";
String regex = "^" + num + "\\." + num + "\\." + num + "\\." + num + "$";
return match(regex, str);
}
/**
* ÑéÖ¤ÍøÖ·Url
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean IsUrl(String str)
{
String regex = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=]*)?";
return match(regex, str);
}
/**
* ÑéÖ¤µç»°ºÅÂë
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean IsTelephone(String str)
{
String regex = "^(\\d{3,4}-)?\\d{6,8}$";
return match(regex, str);
}
/**
* ÑéÖ¤ÊäÈëÃÜÂëÌõ¼þ(×Ö·ûÓëÊý¾Ýͬʱ³öÏÖ)
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ·ûºÏ¸ñʽµÄ×Ö·û´®,·µ»Ø <b>true </b>,·ñÔòΪ <b>false </b>
*/
public static boolean IsPassword(String str)
{
String regex = "[A-Za-z]+[0-9]";
return match(regex, str);
}
/**
* ÑéÖ¤ÊäÈëÃÜÂ볤¶È (6-18λ)
* @param ´ýÑéÖ¤µÄ×Ö·û´®
* @return Èç¹ûÊÇ
Ïà¹ØÎĵµ£º
1 Èç¹ûÒ»¿éÄÚ´æÇøÓòÄܹ»Öظ´ÀûÓã¬×îºÃ²»ÒªÉêÇëеġ£Õâ¸öÄÚ´æÇøÓòÓпÉÄÜÊÇϵͳµÄÒ»¸öÀ࣬×Ô¼ºµÄÒ»¸öÄÚ²¿ÓÐÊý×éÔªËØ£¬»òÕßÄܹ»·Å´óÁ¿Êý¾ÝµÄ½á¹¹¡£
2 ×îºÃ²»ÒªÔÚÑ»·ÀïÃæÉêÇëÄڴ棬ѻ·Ô½´ó£¬Ô½»µÊ¡£»»¾ä»°Ëµ£¬ÉêÇëÄÚ´æƵÂʱðÌ«¸ß¡£ºÃ±ÈÒ»¸öÈËÿ¶Ù³ÔÁ½Íë·¹ÕýºÃ£¬ÉíÌåµÄÏû»¯ÏµÍ³¿ÉÒÔ³ÐÊÜ£¬Èç¹ûÈÃËûÒ»¶Ù°ÑÊ®¶ÙµÄ¶¼³Ôµô£¬²»ÕÍ ......
JavaÓïÑÔµÄÊäÈëÊä³ö¹¦ÄÜÊÇÊ®·ÖÇ¿´ó¶øÁé»îµÄ£¬ÃÀÖв»×ãµÄÊÇ¿´ÉÏÈ¥ÊäÈëÊä³öµÄ´úÂë²¢²»ÊǺܼò½à£¬ÒòΪÄãÍùÍùÐèÒª°ü×°Ðí¶à²»Í¬µÄ¶ÔÏó¡£ÔÚJavaÀà¿âÖУ¬IO²¿·ÖµÄÄÚÈÝÊǺÜÅÓ´óµÄ£¬ÒòΪËüÉæ¼°µÄÁìÓòºÜ¹ã·º:±ê×¼ÊäÈëÊä³ö£¬ÎļþµÄ²Ù×÷£¬ÍøÂçÉϵÄÊý¾ÝÁ÷£¬×Ö·û´®Á÷£¬¶ÔÏóÁ÷£¬zipÎļþÁ÷....±¾ÎĵÄÄ¿µÄÊÇΪ´ó¼Ò×öÒ»¸ö¼òÒªµÄ½éÉÜ¡£
¡¡¡¡Á ......
package com.deng.oracle;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class TestOracle {
public static void main(String[] args) {
try {
Class.forName("oracle.jdbc.driver.OracleDriv ......
ת×Ô£ºIBM¼¼ÊõÉçÇø2009 Java רÇø×îÊÜ»¶ÓÄÚÈÝ
×îÊÜ»¶ÓµÄÈÈÃÅÖ÷Ìâ
Web ¿ª·¢
2009
Ä꣬Web 2.0 Èȳ±´Ùʹ Web ¿ª·¢¼ÌÐø³ÉΪµ±Ç°×îÈÈÃŵÄÖ÷Ìâ¡£ÆäÖУ¬»ùÓÚ¶¯Ì¬ÓïÑÔ Goovy µÄÐÂÐË Web ¿ª·¢¿ò¼Ü Grails
³ÉΪÁ˱¸ÊÜÖõÄ¿µÄÐÂÐÇ¡£³ý´ËÖ®Í⣬Ðí¶à´«Í³µÄ»ùÓÚ Java ÓïÑ﵀ Web ¿ª·¢¿ò¼Ü£¬Èç Struts¡¢JSF¡¢GWT
µÈ£¬Ò²¶¼ÈÚÈë ......
Êý¾Ý½á¹¹ºÍËã·¨
ðÅÝ£ºÃ¿´Î±È½Ï¶¼¿ÉÕÒ³ö×î´ó»ò×îСµÄ£¬ÓÐÐòµÄÔÚ×îÓÒ±ß
Ñ¡ÔñÅÅÐò£ºÓÐÐòµÄÔÚ×î×ó±ß
²åÈëÅÅÐò£ºËٶȱÈðÅÝ¿ìÒ»±¶£¬±ÈÑ¡ÔñÒ²¿ì¡£
µÝ¹é
µ÷ÓÃ×ÔÉí
ººÅµËþÎÊÌ⣺
/**
* @ººÅµËþµÄÎÊÌâ
*/
......