JavaÕýÔò±í´ïʽÈëÃÅ[z]
ÖÚËùÖÜÖª£¬ÔÚ³ÌÐò¿ª·¢ÖУ¬ÄÑÃâ»áÓöµ½ÐèҪƥÅä¡¢²éÕÒ¡¢Ìæ»»¡¢ÅжÏ×Ö·û´®µÄÇé¿ö·¢Éú£¬¶øÕâЩÇé¿öÓÐʱÓֱȽϸ´ÔÓ£¬Èç¹ûÓô¿±àÂ뷽ʽ½â¾ö£¬ÍùÍù»áÀ˷ѳÌÐòÔ±µÄʱ¼ä¼°¾«Á¦¡£Òò´Ë£¬Ñ§Ï°¼°Ê¹ÓÃÕýÔò±í´ïʽ£¬±ã³ÉÁ˽â¾öÕâһì¶ÜµÄÖ÷ÒªÊֶΡ£
´ó¼Ò¶¼ÖªµÀ£¬ÕýÔò±í´ïʽÊÇÒ»ÖÖ¿ÉÒÔÓÃÓÚģʽƥÅäºÍÌæ»»µÄ¹æ·¶£¬Ò»¸öÕýÔò±í´ïʽ¾ÍÊÇÓÉÆÕͨµÄ×Ö·û£¨ÀýÈç×Ö·ûaµ½z£©ÒÔ¼°ÌØÊâ×Ö·û£¨Ôª×Ö·û£©×é³ÉµÄÎÄ×Öģʽ£¬ËüÓÃÒÔÃèÊöÔÚ²éÕÒÎÄ×ÖÖ÷Ìåʱ´ýÆ¥ÅäµÄÒ»¸ö»ò¶à¸ö×Ö·û´®¡£ÕýÔò±í´ïʽ×÷Ϊһ¸öÄ£°å£¬½«Ä³¸ö×Ö·ûģʽÓëËùËÑË÷µÄ×Ö·û´®½øÐÐÆ¥Åä¡£
×Ô´Ójdk1.4ÍƳöjava.util.regex°ü£¬¾ÍΪÎÒÃÇÌṩÁ˺ܺõÄJAVAÕýÔò±í´ïʽӦÓÃƽ̨¡£
ÒòΪÕýÔò±í´ïʽÊÇÒ»¸öºÜÅÓÔÓµÄÌåϵ£¬ËùÒÔÎÒ½öÀý¾ÙЩÈëÃŵĸÅÄ¸ü¶àµÄÇë²ÎÔÄÏà¹ØÊé¼®¼°×ÔÐÐÃþË÷¡£
\\ ·´Ð±¸Ü
\t ¼ä¸ô ('\u0009')
\n »»ÐÐ ('\u000A')
\r »Ø³µ ('\u000D')
\d Êý×Ö µÈ¼ÛÓÚ[0-9]
\D ·ÇÊý×Ö µÈ¼ÛÓÚ[^0-9]
\s ¿Õ°×·ûºÅ [\t\n\x0B\f\r]
\S ·Ç¿Õ°×·ûºÅ [^\t\n\x0B\f\r]
\w µ¥¶À×Ö·û [a-zA-Z_0-9]
\W ·Çµ¥¶À×Ö·û [^a-zA-Z_0-9]
\f »»Ò³·û
\e Escape
\b Ò»¸öµ¥´ÊµÄ±ß½ç
\B Ò»¸ö·Çµ¥´ÊµÄ±ß½ç
\G Ç°Ò»¸öÆ¥ÅäµÄ½áÊø
^ΪÏÞÖÆ¿ªÍ·
^java Ìõ¼þÏÞÖÆΪÒÔJavaΪ¿ªÍ·×Ö·û
$ΪÏÞÖƽáβ
java$ Ìõ¼þÏÞÖÆΪÒÔjavaΪ½áβ×Ö·û
. Ìõ¼þÏÞÖƳý\nÒÔÍâÈÎÒâÒ»¸öµ¥¶À×Ö·û
java.. Ìõ¼þÏÞÖÆΪjavaºó³ý»»ÐÐÍâÈÎÒâÁ½¸ö×Ö·û
¼ÓÈëÌض¨ÏÞÖÆÌõ¼þ¡¸[]¡¹
[a-z] Ìõ¼þÏÞÖÆÔÚСдa to z·¶Î§ÖÐÒ»¸ö×Ö·û
[A-Z] Ìõ¼þÏÞÖÆÔÚ´óдA to Z·¶Î§ÖÐÒ»¸ö×Ö·û
[a-zA-Z] Ìõ¼þÏÞÖÆÔÚСдa to z»ò´óдA to Z·¶Î§ÖÐÒ»¸ö×Ö·û
[0-9] Ìõ¼þÏÞÖÆÔÚСд0 to 9·¶Î§ÖÐÒ»¸ö×Ö·û
[0-9a-z] Ìõ¼þÏÞÖÆÔÚСд0 to 9»òa to z·¶Î§ÖÐÒ»¸ö×Ö·û
[0-9[a-z]] Ìõ¼þÏÞÖÆÔÚСд0 to 9»òa to z·¶Î§ÖÐÒ»¸ö×Ö·û(½»¼¯)
[]ÖмÓÈë^ºó¼ÓÔÙ´ÎÏÞÖÆÌõ¼þ¡¸[^]¡¹
[^a-z] Ìõ¼þÏÞÖÆÔÚ·ÇСдa to z·¶Î§ÖÐÒ»¸ö×Ö·û
[^A-Z] Ìõ¼þÏÞÖÆÔÚ·Ç´óдA to Z·¶Î§ÖÐÒ»¸ö×Ö·û
[^a-zA-Z] Ìõ¼þÏÞÖÆÔÚ·ÇСдa to z»ò´óдA to Z·¶Î§ÖÐÒ»¸ö×Ö·û
[^0-9] Ìõ¼þÏÞÖÆÔÚ·ÇСд0 to 9·¶Î§ÖÐÒ»¸ö×Ö·û
[^0-9a-z] Ìõ¼þÏÞÖÆÔÚ·ÇСд0 to 9»òa to z·¶Î§ÖÐÒ»¸ö×Ö·û
[^0-9[a-z]] Ìõ¼þÏÞ
Ïà¹ØÎĵµ£º
//java½âÎö.mdbÎļþµÄ±íÃû¼¯ºÏ
this.tableList.clear();
conn = null;
st = null;
rs = null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url ="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ="+dbName;// ......
JavaÉú³ÉͼƬÑéÖ¤Âë
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.awt.*;
import java.awt.image.*;
import java.util.*;
import javax.imageio.*;
/**
*
* @author http://www.tot.name
* @version
*/
public cl ......
public class Test {
public static void main(String args[]){
try{
// »ñÈ¡¼üÅÌÊäÈëµÄ×Ö·û´®
BufferReader f = new BufferReader(new inputStreamReader(System.in));
String str = f.readline();
for (int i = str.length() -1 ; i >=0 ; i--) {
System.out.print(CharAt(i)); ......
1¡¢ ¶ÔÏóµÄ³õʼ»¯
(1) ·Ç¾²Ì¬¶ÔÏóµÄ³õʼ»¯
ÔÚ´´½¨¶ÔÏóʱ£¬¶ÔÏóËùÔÚÀàµÄËùÓÐÊý¾Ý³ÉÔ±»áÊ×ÏȽøÐгõʼ»¯¡£
»ù±¾ÀàÐÍ£ºintÐÍ£¬³õʼ»¯Îª0¡£
Èç¹ûΪ¶ÔÏó£ºÕâЩ¶ÔÏó»á°´Ë³Ðò³õʼ»¯¡£
¡ùÔÚËùÓÐÀà³ÉÔ±³õʼ»¯Íê³ÉÖ®ºó£¬²Åµ÷Óñ¾ÀàµÄ¹¹Ôì·½·¨´´½¨¶ÔÏó¡£
¹¹Ôì·½·¨µ ......