Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java³£ÓÃÕý則±í達ʽ

public class Regex {

/**
* ¼ì²éemailÊäÈëÊÇ·ñÕýÈ·
* ÕýÈ·µÄÊéд¸ñʽΪ username@domain
* @param value
* @return
*/
public boolean checkEmail(String value, int length) {
return value.matches("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*")&&value.length()<=length;
}

/**
* ¼ì²éµç»°ÊäÈëÊÇ·ñÕýÈ·
* ÕýÈ·¸ñʽ 012-87654321¡¢0123-87654321¡¢0123£­7654321
* @param value
* @return
*/
public boolean checkTel(String value) {
return value.matches("\\d{4}-\\d{8}|\\d{4}-\\d{7}|\\d(3)-\\d(8)");
}

/**
* ¼ì²éÊÖ»úÊäÈëÊÇ·ñÕýÈ·
*
* @param value
* @return
*/
public boolean checkMobile(String value) {
return value.matches("^[1][3,5]+\\d{9}");
}

/**
* ¼ì²éÖÐÎÄÃûÊäÈëÊÇ·ñÕýÈ·
*
* @param value
* @return
*/
public boolean checkChineseName(String value, int length) {
return value.matches("^[\u4e00-\u9fa5]+$")&&value.length()<=length;
}
/**
* ¼ì²éHTMLÖÐÊ×β¿ÕÐлò¿Õ¸ñ
* @param value
* @return
*/
public boolean checkBlank(String value){
return value.matches("^\\s*|\\s*$");
}
/**
* ¼ì²é×Ö·û´®ÊÇ·ñº¬ÓÐHTML±êÇ©
* @param value
* @return
*/

public boolean checkHtmlTag(String value){
return value.matches("<(\\S*?)[^>]*>.*?</\\1>|<.*? />");
}
/**
* ¼ì²éURLÊÇ·ñºÏ·¨
* @param value
* @return
*/
public boolean checkURL(String value){
return value.matches("[a-zA-z]+://[^\\s]*");
}
/**
* ¼ì²éIPÊÇ·ñºÏ·¨
* @param value
* @return
*/


Ïà¹ØÎĵµ£º

JavaÓïÑÔ»ù´¡ÖªÊ¶

JavaÓïÑÔ»ù´¡ÖªÊ¶
³ÌÐòÔ±¶Ô³ÌÐòÖеĸ÷¸öÔªËØ¼ÓÒÔÃüÃûʱʹÓõÄÃüÃû¼ÇºÅ³ÆÎª±êʶ·û£¨identifier£©¡£
JavaÓïÑÔÖУ¬±êʶ·ûÊÇÒÔ×Öĸ£¬Ï»®Ïߣ¨_£©,ÃÀÔª·û($)¿ªÊ¼µÄÒ»¸ö×Ö·ûÐòÁУ¬ºóÃæ¿ÉÒÔ¸ú×Öĸ£¬Ï»®Ïߣ¬ÃÀÔª·û£¬Êý×Ö¡£
ÀýÈ磬identifier£¬userName£¬User_Name£¬_sys_val£¬ $changeΪºÏ·¨µÄ±êʶ·û£¬¶ø2mail room#£¬class Ϊ· ......

Java×Ô¶¨Òå¶àÏ̷߳þÎñÆ÷

// multi.MultiServer.java
package multi;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
public class MultiServer {
private int port = 8000;
private int backlog = 42;
private ServerSocket server_socket;
private Thread ......

javaÅжÏ×ÓÍøÑÚÂë

String[] ips = ipValue.split("\\.");
String binaryVal = "";
for (int i = 0; i < ips.length; i++)
{
String binaryStr = Integer.toBinaryString(Integer.parseInt(ips[i]));


Integer times = 8 - binaryStr.length();
......

JAVA Á¬½Ó³Ø BoneCP ²âÊÔ£¨2£© with spring 3

¶îÍâJAR°ü£º
org.springframework.expression-3.0.1.RELEASE.jar
org.springframework.asm-3.0.1.RELEASE.jar
org.springframework.beans-3.0.1.RELEASE.jar
p:statementCacheSize="100"
<bean id="masterDataSource" class="com.jolbox.bonecp.BoneCPDataSource" destroy-method="close"
p:driverClass="com.m ......

java DOM ×¢ÒâÊÂÏî

1.  W3C°Ñ±êÇ©ÄÚµÄÎı¾²¿·ÖÒ²¶¨Òå³ÉÒ»¸öNode
2. 
Element¶ÔÏó´ú±íµÄÊÇXMLÎĵµÖеıêÇ©ÔªËØ
£¬¼Ì³ÐÓÚNode£¬ÒàÊÇNodeµÄ×îÖ÷ÒªµÄ×Ó¶ÔÏó
3.  Attrʵ¼ÊÉÏÊǰüº¬ÔÚElementÖеģ¬Ëü²¢²»Äܱ»¿´×÷ÊÇElementµÄ×Ó¶ÔÏó£¬Òò¶øÔÚDOMÖÐAttr²¢²»ÊÇDOMÊ÷µÄÒ»²¿·Ö£¬ËùÒÔNodeÖеĠ getparentNode()£¬getpreviousSiblin ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ