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

java¹ýÂËÌØÊâ×Ö·û

public   static   String StringFilter(String   str)   throws  
PatternSyntaxException   {
          // Ö»ÔÊÐí×ÖĸºÍÊý×Ö       
          // String   regEx  =  "[^a-zA-Z0-9]";                     

             // Çå³ýµôËùÓÐÌØÊâ×Ö·û  
    String
regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~£¡@#£¤%……&*£¨£©——+|
{}¡¾¡¿‘£»£º”“’¡££¬¡¢£¿]";  
    Pattern   p   =   Pattern.compile(regEx);     
    Matcher   m   =   p.matcher(str);     
    return   m.replaceAll("").trim();     
    }

http://sunlianwei.javaeye.com/blog/363759


Ïà¹ØÎĵµ£º

JAVA ÅÀÍøÒ³ÓÃ ÀýÈç:http://www.126.com

/*
Function name: myGetHttpFile2
Description: ÅÀÍøÒ³ÓÃ
Input: URL ÀýÈç:http://www.126.com
Output: ×Ö·û´®,ÍøÒ³µÄHTML
*/
public String myGetHttpFile2(String url){
String authentication=null;
ArrayList al=new ArrayList();
String PageURL = url;
......

java ËõÂÔͼ ʵÏÖ

import  java.awt.image. * ;
import  com.sun.image.codec.jpeg. * ;   
 public class poiReadDoc {
 Image img = null;
 int width = 0,height =0;
 String destFile = "";
 public void readImg(String fileName) throws IOException{
  File _fil ......

JAVAÖÐÈ¥µô¿Õ¸ñtrimº¯ÊýµÄ·½·¨

¡¡1. String.trim()
¡¡¡¡trim()ÊÇÈ¥µôÊ×β¿Õ¸ñ
¡¡¡¡2.str.replace(" ", ""); È¥µôËùÓпոñ£¬°üÀ¨Ê×β¡¢Öмä
¡¡String str = " hell o ";
¡¡¡¡String str2 = str.replaceAll(" ", "");
¡¡¡¡System.out.println(str2);
¡¡¡¡3.»òÕßreplaceAll(" +",""); È¥µôË ......

Java ¶íÂÞ˹·½¿é

import java.awt.*;
import java.awt.event.*;
//¶íÂÞ˹·½¿éÀà
public class ERS_Block extends Frame{
 public static boolean isPlay=false;
 public static int level=1,score=0;
 public static TextField scoreField,levelField;
 
 public static MyTimer timer;
 Ga ......

javaÈçºÎÀォÎļþ´æµ½Êý¾Ý¿âÖÐ

public class InsertBlobData {
Connection con = null;
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
InsertBlobData data = new InsertBlobData();
data.insertBlogInfo("002jpg", "sdsdfdf", "2007-02-1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ