Java ÕýÔò±í´ïʽ
fm.split("["); // error
-------------------
java.util.regex.PatternSyntaxException: Unclosed character class near index 0[+
^
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.clazz(Unknown Source)
at java.util.regex.Pattern.clazz(Unknown Source)
===========================
fm.split("\\["); //ok
ÔÚÕýÔòÖУ¬ [ ÊÇÌØÊâ×Ö·û ÐèÒª¶ÔÆäתÒå´¦Àí¡£
Ïà¹ØÎĵµ£º
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......
JAVA Ìåϵ¼°Æä±à³ÌµÄ¹ý³Ì
°¥£¬±ÏÒµÁËÒ²Ò»¶Îʱ¼äÁË£¬Ö»ÖªµÀÌìÌì³´úÂ룬 JAVA µÄ»ù´¡ÖªÊ¶»ù±¾ÊÇÍüµôÁË£¬¼ÓÉÏÒÔǰһֱûÓÐϵͳµØѧϰ¹ý£¬¸Ð¾õ¿ìÒª·ÏÁË¡£»¹ÊǺúþ²ÏÂÐÄÀ´Ñ§Ñ§»ù´¡°É¡£²»ÄÜÌìÌ쿼³´úÂë¹ýÈÕ×Ó°¡¡£¡£¡£¡££¨ÏÂÎÄ´ó¶àÀ´×Կα¾ÒÔ¼°Ò»Ð©¼¼ÊõÊÓƵÉϵÄÄÚÈÝ£¬»ù±¾Àí½âÁËһЩÁË£¬Ê£ÏµÄÓÉÒÔºóµÄѧϰÂýÂýÔ ......
import java.io.*;
public class TestExe {
public static void main(String[] args) throws InterruptedException {
try {
Process child = Runtime.getRuntime().exec("C://Program Files//Sunyard//ImageInput//ImageInput.exe");
child.waitFor();
&n ......
ÕýÔò±í´ïʽÊÇ×Ö·û´®´¦ÀíµÄÖÕ¼«ÎäÆ÷£¬±¾ÎÄÒÔÒ»¸ö¾ßÌåÌâÄ¿¼ò½éjava¶ÔÕýÔò±í´ïʽµÄÖ§³Ö¡£
ÌâÄ¿£º½«Ò»¸ö×Ö·û´®ÖеÄÐÎÈçhref=“XXXX”ºÍsrc=“XXXX”µÄ²¿·ÖÈ¡³ö£¬´òÓ¡¡£
´¦ÀíÕýÔò±í´ïʽÖ÷ÒªÓõ½java.util.regex.MatcherºÍjava.util.regex.PatternÁ½¸öÀà¡£
\\²âÊÔÓõÄ×Ö·û´®
String source= "...href=\" ......
ÊÖ¶¯½¨±í£º
CREATE TABLE `excel` (
`id` int(11) DEFAULT NULL,
`name` varchar(50) DEFAULT NULL,
`passwd` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=gb2312; ×¢ÒâÊÇgb2312
È»ºóÔÚÁ¬½ÓÊý¾Ý¿âʱ¼ÓÉÏ:
useUnicode=true&characterEncoding=gb2312.
¾ÍokÀ²£¡ ......