{"id":55067,"date":"2025-08-13T15:49:41","date_gmt":"2025-08-13T07:49:41","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/55067.html"},"modified":"2025-08-13T15:49:41","modified_gmt":"2025-08-13T07:49:41","slug":"%e4%b8%80%e7%af%87%e5%b8%a6%e4%bd%a0%e7%8e%a9%e8%bd%ac%ef%bc%9a%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%ef%bc%88java%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/55067.html","title":{"rendered":"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09"},"content":{"rendered":"<h3 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">\u4e00\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u57fa\u7840<\/h3>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">1.1 \u57fa\u672c\u6982\u5ff5<\/h4>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#xff08;1&#xff09;\u5b9a\u4e49&#xff1a;\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u7528\u4e8e\u63cf\u8ff0\u5b57\u7b26\u4e32\u6a21\u5f0f\u7684\u5f62\u5f0f\u5316\u8868\u793a\u6cd5&#xff0c;\u901a\u8fc7\u7279\u5b9a\u5b57\u7b26\u548c\u5b83\u4eec\u7684\u7ec4\u5408\u6765\u521b\u5efa \u201c\u89c4\u5219\u5b57\u7b26\u4e32\u201d&#xff0c;\u7528\u4e8e\u5339\u914d\u3001\u67e5\u627e\u548c\u66ff\u6362\u6587\u672c\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#xff08;2&#xff09;\u7528\u9014&#xff1a;\u5e38\u7528\u4e8e\u6587\u672c\u5904\u7406\u4efb\u52a1&#xff0c;\u5982\u9a8c\u8bc1\u7528\u6237\u8f93\u5165\u683c\u5f0f&#xff08;\u90ae\u7bb1\u3001\u7535\u8bdd\u53f7\u7801\u7b49&#xff09;\u3001\u4ece\u6587\u672c\u4e2d\u63d0\u53d6\u7279\u5b9a\u4fe1\u606f\u3001\u66ff\u6362\u6587\u672c\u4e2d\u7684\u67d0\u4e9b\u90e8\u5206\u7b49\u7b49\u3002<span style=\"color:#fe2c24\">\u8bf4\u767d\u4e86&#xff0c;\u5c31\u662f\u7528\u4e8e\u5904\u7406\u590d\u6742\u7684\u5b57\u7b26\u4e32\u3002<\/span><\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">1.2\u5e38\u7528\u7b26\u53f7\u4e0e\u5143\u5b57\u7b26&#xff08;<span style=\"color:#ff9900\">\u65b9\u4fbf\u67e5\u627e<\/span>&#xff09;<\/h4>\n<table align=\"center\" cellspacing=\"0\" style=\"width:461.6500pt\">\n<tbody>\n<tr>\n<td style=\"background-color:#f2f2f2;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u7b26\u53f7<\/p>\n<\/td>\n<td style=\"background-color:#f2f2f2;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u542b\u4e49<\/p>\n<\/td>\n<td style=\"background-color:#f2f2f2;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u793a\u4f8b\u53ca\u89e3\u91ca<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u666e\u901a\u5b57\u7b26<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u81ea\u8eab<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5982a\u5339\u914d\u5b57\u7b26a&#xff0c;5\u5339\u914d\u5b57\u7b265<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">.<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u9664\u6362\u884c\u7b26\u5916\u7684\u4efb\u610f\u5355\u4e2a\u5b57\u7b26<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">a.c\u53ef\u5339\u914dabc\u3001a1c\u7b49&#xff0c;\u4f46\u4e0d\u5339\u914da\\\\nc<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">^<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u5b57\u7b26\u4e32\u7684\u5f00\u5934<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">^abc\u53ef\u5339\u914d\u4ee5abc\u5f00\u5934\u7684\u5b57\u7b26\u4e32&#xff0c;\u5982abcdef&#xff0c;\u4f46\u4e0d\u5339\u914ddabc<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">$<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u5b57\u7b26\u4e32\u7684\u7ed3\u5c3e<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">abc$\u53ef\u5339\u914d\u4ee5abc\u7ed3\u5c3e\u7684\u5b57\u7b26\u4e32&#xff0c;\u5982defabc&#xff0c;\u4f46\u4e0d\u5339\u914dabcdef<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">*<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u96f6\u6b21\u6216\u591a\u6b21<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">a*\u53ef\u5339\u914d\u7a7a\u5b57\u7b26\u4e32\u3001a\u3001aa\u3001aaa\u7b49&#xff1b;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">(ab)*\u53ef\u5339\u914d\u7a7a\u5b57\u7b26\u4e32\u3001ab\u3001abab\u7b49<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">&#043;<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u4e00\u6b21\u6216\u591a\u6b21<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">a&#043;\u53ef\u5339\u914da\u3001aa\u3001aaa\u7b49&#xff1b;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">(ab)&#043;\u53ef\u5339\u914dab\u3001abab\u7b49<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">?<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u96f6\u6b21\u6216\u4e00\u6b21<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">a?\u53ef\u5339\u914d\u7a7a\u5b57\u7b26\u4e32\u6216a&#xff1b;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">(ab)?\u53ef\u5339\u914d\u7a7a\u5b57\u7b26\u4e32\u6216ab<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">[]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5b57\u7b26\u96c6\u5408&#xff0c;\u5339\u914d\u5176\u4e2d\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">[abc] \u53ef\u5339\u914da\u6216b\u6216c&#xff1b;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">[0 &#8211; 9]\u53ef\u5339\u914d\u4efb\u610f\u4e00\u4f4d\u6570\u5b57<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">[^]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5426\u5b9a\u5b57\u7b26\u96c6\u5408&#xff0c;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4e0d\u5728\u5176\u4e2d\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">[^abc]\u53ef\u5339\u914d\u9664a\u3001b\u3001c\u4e4b\u5916\u7684\u4efb\u610f\u5b57\u7b26<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">()<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5206\u7ec4&#xff0c;\u6539\u53d8\u4f18\u5148\u7ea7\u6216\u7528\u4e8e\u53cd\u5411\u5f15\u7528<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">(ab)&#043;\u8868\u793aab\u6574\u4f53\u91cd\u590d\u591a\u6b21&#xff1b;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">(a(bc))\u4e2d&#xff0c;\\\\1\u4ee3\u8868\u6574\u4e2aa(bc)&#xff0c;\\\\2\u4ee3\u8868bc<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u8f6c\u4e49\u5b57\u7b26&#xff0c;\u4f7f\u7279\u6b8a\u5b57\u7b26\u5339\u914d\u81ea\u8eab<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\.\u5339\u914d\u5b57\u7b26.&#xff1b;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\*\u5339\u914d\u5b57\u7b26*<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\d<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u6570\u5b57&#xff0c;\u7b49\u4ef7\u4e8e[0 &#8211; 9]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\d\u53ef\u5339\u914d0\u52309\u4e2d\u7684\u4efb\u610f\u4e00\u4e2a\u6570\u5b57&#xff0c;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5982a\\\\dc\u53ef\u5339\u914da1c\u3001a2c\u7b49<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\D<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u975e\u6570\u5b57\u5b57\u7b26&#xff0c;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u7b49\u4ef7\u4e8e[^0 &#8211; 9]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\D\u53ef\u5339\u914d\u9664\u6570\u5b57\u5916\u7684\u5b57\u7b26&#xff0c;\u5982\\\\Da\u53ef\u5339\u914da\u3001b\u3001&#064;\u7b49\u4e0e\u6570\u5b57\u4e0d\u540c\u7684\u5b57\u7b26<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\s<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u7a7a\u767d\u5b57\u7b26&#xff0c;\u5305\u62ec\u7a7a\u683c\u3001\u5236\u8868\u7b26\u3001\u6362\u884c\u7b26\u7b49&#xff0c;\u7b49\u4ef7\u4e8e[ \\\\f\\\\n\\\\r\\\\t\\\\v]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5982a\\\\sb\u53ef\u5339\u914da b&#xff08;\u4e2d\u95f4\u6709\u7a7a\u683c&#xff09;\u3001<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">a\\\\n b&#xff08;a\u548cb\u4e2d\u95f4\u6362\u884c&#xff09;\u7b49<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\S<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u975e\u7a7a\u767d\u5b57\u7b26&#xff0c;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u7b49\u4ef7\u4e8e[^ \\\\f\\\\n\\\\r\\\\t\\\\v]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\S\u53ef\u5339\u914d\u9664\u7a7a\u767d\u5b57\u7b26\u5916\u7684\u5b57\u7b26&#xff0c;\u5982\\\\Sa\u53ef\u5339\u914d1a\u3001ba\u7b49&#xff0c;\u53ea\u8981\u4e0d\u662f\u7a7a\u767d\u5b57\u7b26\u5f00\u5934\u5373\u53ef<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\w<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u5355\u8bcd\u5b57\u7b26&#xff0c;\u5305\u62ec\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u4e0b\u5212\u7ebf&#xff0c;\u7b49\u4ef7\u4e8e[a-zA &#8211; Z0 &#8211; 9_]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\w\u53ef\u5339\u914da\u5230z\u3001A\u5230Z\u30010\u52309\u4ee5\u53ca_&#xff0c;\u5982\\\\w&#043;\u53ef\u5339\u914dabc\u3001123\u3001abc123_\u7b49\u5355\u8bcd\u5b57\u7b26\u7ec4\u5408<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;width:54px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\W<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:268px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u975e\u5355\u8bcd\u5b57\u7b26&#xff0c;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u7b49\u4ef7\u4e8e[^a-zA &#8211; Z0 &#8211; 9_]<\/p>\n<\/td>\n<td style=\"background-color:#ffffff;width:292px\">\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\\\\W\u53ef\u5339\u914d\u9664\u5355\u8bcd\u5b57\u7b26\u5916\u7684\u5b57\u7b26&#xff0c;<\/p>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:center\">\u5982\\\\W&#043;\u53ef\u5339\u914d&#064;\u3001#\u3001&#xff08;\u7a7a\u683c&#xff09;\u7b49<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">1.3\u00a0\u91cf\u8bcd<\/h4>\n<p style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\"><span style=\"background-color:#ffff00\">&#xff08;<\/span><span style=\"background-color:#ffff00\">1<\/span><span style=\"background-color:#ffff00\">&#xff09;<\/span><span style=\"background-color:#ffff00\">*&#xff08;\u96f6\u6b21\u6216\u591a\u6b21&#xff09;<\/span>&#xff1a;\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u96f6\u6b21\u6216\u591a\u6b21\u3002\u4f8b\u5982a*&#xff0c;\u53ef\u4ee5\u5339\u914d\u7a7a\u5b57\u7b26\u4e32&#xff0c;\u4e5f\u53ef\u4ee5\u5339\u914d\u4e00\u4e2a\u6216\u591a\u4e2a\u8fde\u7eed\u7684a&#xff0c;\u5982a\u3001aa\u3001aaa\u7b49\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><span style=\"background-color:#ffff00\">&#xff08;<\/span><span style=\"background-color:#ffff00\">2<\/span><span style=\"background-color:#ffff00\">&#xff09;<\/span><span style=\"background-color:#ffff00\">&#043;&#xff08;\u4e00\u6b21\u6216\u591a\u6b21&#xff09;<\/span>&#xff1a;\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u4e00\u6b21\u6216\u591a\u6b21\u3002\u4f8b\u5982a&#043;&#xff0c;\u81f3\u5c11\u5339\u914d\u4e00\u4e2aa&#xff0c;\u53ef\u4ee5\u662fa\u3001aa\u3001aaa\u7b49&#xff0c;\u4f46\u4e0d\u80fd\u5339\u914d\u7a7a\u5b57\u7b26\u4e32\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><span style=\"background-color:#ffff00\">&#xff08;<\/span><span style=\"background-color:#ffff00\">3<\/span><span style=\"background-color:#ffff00\">&#xff09;<\/span><span style=\"background-color:#ffff00\">?&#xff08;\u96f6\u6b21\u6216\u4e00\u6b21&#xff09;<\/span>&#xff1a;\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u96f6\u6b21\u6216\u4e00\u6b21\u3002\u4f8b\u5982a?&#xff0c;\u53ef\u4ee5\u5339\u914d\u7a7a\u5b57\u7b26\u4e32&#xff0c;\u4e5f\u53ef\u4ee5\u5339\u914d\u4e00\u4e2aa\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><span style=\"background-color:#ffff00\">&#xff08;<\/span><span style=\"background-color:#ffff00\">4<\/span><span style=\"background-color:#ffff00\">&#xff09;<\/span><span style=\"background-color:#ffff00\">{n}&#xff08;\u6070\u597d n \u6b21&#xff09;<\/span>&#xff1a;\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u6070\u597d n \u6b21\u3002\u4f8b\u5982a{3}&#xff0c;\u53ea\u80fd\u5339\u914d\u8fde\u7eed\u7684\u4e09\u4e2aa&#xff0c;\u5373aaa\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><span style=\"background-color:#ffff00\">&#xff08;<\/span><span style=\"background-color:#ffff00\">5<\/span><span style=\"background-color:#ffff00\">&#xff09;<\/span><span style=\"background-color:#ffff00\">{n,}&#xff08;\u81f3\u5c11 n \u6b21&#xff09;<\/span>&#xff1a;\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u81f3\u5c11 n \u6b21\u3002\u4f8b\u5982a{2,}&#xff0c;\u53ef\u4ee5\u5339\u914daa\u3001aaa\u3001aaaa\u7b49\u4e24\u4e2a\u6216\u66f4\u591a\u4e2a\u8fde\u7eed\u7684a\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><span style=\"background-color:#ffff00\">&#xff08;<\/span><span style=\"background-color:#ffff00\">6<\/span><span style=\"background-color:#ffff00\">&#xff09;<\/span><span style=\"background-color:#ffff00\">{n,m}&#xff08;n \u5230 m \u6b21&#xff09;<\/span>&#xff1a;\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f n \u5230 m \u6b21&#xff08;n \u548c m \u4e3a\u975e\u8d1f\u6574\u6570&#xff0c;\u4e14 n &lt;&#061; m&#xff09;\u3002\u4f8b\u5982a{1,3}&#xff0c;\u53ef\u4ee5\u5339\u914da\u3001aa\u3001aaa\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">1.4\u00a0\u5b57\u7b26\u96c6<\/h4>\n<h5 style=\"text-align:justify\">&#xff08;1&#xff09;\u666e\u901a\u5b57\u7b26\u96c6[]&#xff1a;<\/h5>\n<p style=\"text-align:justify\">\u5728\u65b9\u62ec\u53f7\u5185\u5217\u51fa\u7684\u5b57\u7b26&#xff0c;\u8868\u793a\u5339\u914d\u5176\u4e2d\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26\u3002\u4f8b\u5982[abc]&#xff0c;\u53ef\u4ee5\u5339\u914da\u3001b\u6216c\u3002\u3002<\/p>\n<h5 style=\"text-align:justify\">&#xff08;2&#xff09;\u8303\u56f4\u5b57\u7b26\u96c6[a &#8211; z]\u3001[0 &#8211; 9]\u7b49\u7b49&#xff1a;<\/h5>\n<p style=\"text-align:justify\">\u901a\u8fc7\u8fde\u5b57\u7b26\u8868\u793a\u5b57\u7b26\u8303\u56f4\u3002[a &#8211; z]\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u5c0f\u5199\u5b57\u6bcd&#xff0c;[0 &#8211; 9]\u5339\u914d\u4efb\u610f\u4e00\u4e2a\u6570\u5b57\u3002<\/p>\n<h5 style=\"text-align:justify\">&#xff08;3&#xff09;\u5426\u5b9a\u5b57\u7b26\u96c6[^]&#xff1a;<\/h5>\n<p style=\"text-align:justify\">\u5728\u65b9\u62ec\u53f7\u5185\u5f00\u5934\u4f7f\u7528^&#xff0c;\u8868\u793a\u5339\u914d\u4e0d\u5728\u62ec\u53f7\u5185\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26\u3002\u4f8b\u5982[^abc]&#xff0c;\u53ef\u4ee5\u5339\u914d\u9664\u4e86a\u3001b\u3001c\u4e4b\u5916\u7684\u4efb\u610f\u5b57\u7b26\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<h3>\u4e8c\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u5339\u914d\u6a21\u5f0f<\/h3>\n<h4>2.1 \u8d2a\u5a6a\u5339\u914d\u4e0e\u975e\u8d2a\u5a6a\u5339\u914d<\/h4>\n<h5>&#xff08;1&#xff09;\u8d2a\u5a6a\u5339\u914d&#xff1a;<\/h5>\n<p>\u6b63\u5219\u8868\u8fbe\u5f0f\u9ed8\u8ba4\u91c7\u7528\u8d2a\u5a6a\u5339\u914d\u6a21\u5f0f&#xff0c;\u5373\u5c3d\u53ef\u80fd\u591a\u5730\u5339\u914d\u5b57\u7b26\u3002\u4f8b\u5982&#xff0c;\u5bf9\u4e8e\u5b57\u7b26\u4e32&#034;aaaab&#034;&#xff0c;\u6b63\u5219\u8868\u8fbe\u5f0fa&#043;\u4f1a\u5339\u914d&#034;aaaa&#034;&#xff0c;\u56e0\u4e3a\u5b83\u4f1a\u4e00\u76f4\u5339\u914d\u5230\u4e0d\u80fd\u518d\u5339\u914d\u4e3a\u6b62\u3002<\/p>\n<h5>&#xff08;2&#xff09;\u975e\u8d2a\u5a6a\u5339\u914d&#xff1a;<\/h5>\n<p>\u5728\u91cf\u8bcd\u540e\u9762\u52a0\u4e0a?\u8868\u793a\u975e\u8d2a\u5a6a\u5339\u914d&#xff0c;\u5373\u5c3d\u53ef\u80fd\u5c11\u5730\u5339\u914d\u5b57\u7b26\u3002\u5bf9\u4e8e\u4e0a\u8ff0\u5b57\u7b26\u4e32&#034;aaaab&#034;&#xff0c;\u6b63\u5219\u8868\u8fbe\u5f0fa&#043;?\u4f1a\u5339\u914d&#034;a&#034;&#xff0c;\u7136\u540e\u7ee7\u7eed\u5f80\u540e\u5339\u914d\u4e0b\u4e00\u4e2a&#034;a&#034;\u3002<br \/>\n\u00a0<\/p>\n<p>\u4f8b\u9898&#xff1a;\u5bf9\u4e8e\u5b57\u7b26\u4e32&#034;aabbb&#034;&#xff0c;\u5206\u522b\u7528b&#043;\u548cb&#043;?\u53bb\u5339\u914d&#xff0c;b&#043;\u4f1a\u5339\u914d&#034;bbb&#034;&#xff1b;\u901a\u8fc7Matcher\u7684find()\u65b9\u6cd5\u5faa\u73af\u67e5\u627e\u65f6&#xff0c;b&#043;?\u4f1a\u4f9d\u6b21\u5339\u914d&#034;b&#034;\u3001&#034;b&#034;\u3001&#034;b&#034;\u3002<\/p>\n<p>import java.util.regex.Matcher;<br \/>\nimport java.util.regex.Pattern;<\/p>\n<p>public class Example {<br \/>\n    public static void main(String[] args) {<br \/>\n        String str &#061; &#034;aabbb&#034;;<br \/>\n        \/\/ \u8d2a\u5a6a\u5339\u914d<br \/>\n        Matcher greedyMatcher &#061; Pattern.compile(&#034;b&#043;&#034;).matcher(str);<br \/>\n        if (greedyMatcher.find()) {<br \/>\n            System.out.println(&#034;\u8d2a\u5a6a\u5339\u914d\u7ed3\u679c&#xff1a;&#034; &#043; greedyMatcher.group()); \/\/ \u8f93\u51fa &#034;bbb&#034;<br \/>\n        }<br \/>\n        \/\/ \u975e\u8d2a\u5a6a\u5339\u914d<br \/>\n        Matcher lazyMatcher &#061; Pattern.compile(&#034;b&#043;?&#034;).matcher(str);<br \/>\n        System.out.print(&#034;\u975e\u8d2a\u5a6a\u5339\u914d\u7ed3\u679c&#xff1a;&#034;);<br \/>\n        while (lazyMatcher.find()) {<br \/>\n            System.out.print(lazyMatcher.group() &#043; &#034; &#034;); \/\/ \u8f93\u51fa &#034;b b b &#034;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h4>2.2 \u5168\u5c40\u5339\u914d\u4e0e\u5c40\u90e8\u5339\u914d<\/h4>\n<p>&#xff08;1&#xff09;\u5168\u5c40\u5339\u914d&#xff1a;\u5728 Java \u4e2d&#xff0c;\u901a\u8fc7Matcher\u7684find()\u65b9\u6cd5\u5faa\u73af\u8c03\u7528\u5b9e\u73b0\u5168\u5c40\u5339\u914d&#xff0c;\u5373\u904d\u5386\u5b57\u7b26\u4e32\u4e2d\u6240\u6709\u7b26\u5408\u6a21\u5f0f\u7684\u90e8\u5206\u3002<\/p>\n<p>&#xff08;2&#xff09;\u5c40\u90e8\u5339\u914d&#xff1a;\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u4f7f\u7528Matcher\u7684find()\u65b9\u6cd5\u9996\u6b21\u8c03\u7528\u4ec5\u8fd4\u56de\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u7ed3\u679c&#xff0c;\u5373\u5c40\u90e8\u5339\u914d\u3002<br \/>\n\u4f8b\u9898&#xff1a;\u5bf9\u4e8e\u5b57\u7b26\u4e32&#034;123abc456abc&#034;&#xff0c;\u5206\u522b\u5b9e\u73b0\u5c40\u90e8\u5339\u914d\u548c\u5168\u5c40\u5339\u914d&#xff1a;<\/p>\n<p>import java.util.regex.Matcher;<br \/>\nimport java.util.regex.Pattern;<\/p>\n<p>public class Example {<br \/>\n    public static void main(String[] args) {<br \/>\n        String str &#061; &#034;123abc456abc&#034;;<br \/>\n        Pattern pattern &#061; Pattern.compile(&#034;abc&#034;);<br \/>\n        Matcher matcher &#061; pattern.matcher(str);<br \/>\n        \/\/ \u5c40\u90e8\u5339\u914d&#xff08;\u83b7\u53d6\u7b2c\u4e00\u4e2a\u7ed3\u679c&#xff09;<br \/>\n        if (matcher.find()) {<br \/>\n            System.out.println(&#034;\u5c40\u90e8\u5339\u914d\u7ed3\u679c&#xff1a;&#034; &#043; matcher.group()); \/\/ \u8f93\u51fa &#034;abc&#034;<br \/>\n        }<br \/>\n        \/\/ \u5168\u5c40\u5339\u914d&#xff08;\u83b7\u53d6\u6240\u6709\u7ed3\u679c&#xff09;<br \/>\n        System.out.print(&#034;\u5168\u5c40\u5339\u914d\u7ed3\u679c&#xff1a;&#034;);<br \/>\n        matcher.reset(); \/\/ \u91cd\u7f6e\u5339\u914d\u5668&#xff0c;\u91cd\u65b0\u5f00\u59cb\u5339\u914d<br \/>\n        while (matcher.find()) {<br \/>\n            System.out.print(matcher.group() &#043; &#034; &#034;); \/\/ \u8f93\u51fa &#034;abc abc &#034;<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h4>2.3 \u533a\u5206\u5927\u5c0f\u5199\u4e0e\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u5339\u914d<\/h4>\n<p>&#xff08;1&#xff09;\u533a\u5206\u5927\u5c0f\u5199\u5339\u914d&#xff1a;<\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b&#xff0c;\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u533a\u5206\u5927\u5c0f\u5199\u7684\u3002\u4f8b\u5982[A-Z]\u53ea\u80fd\u5339\u914d\u5927\u5199\u5b57\u6bcd&#xff0c;[a-z]\u53ea\u80fd\u5339\u914d\u5c0f\u5199\u5b57\u6bcd\u3002\u5bf9\u4e8e\u5b57\u7b26\u4e32&#034;Abc&#034;&#xff0c;\u6b63\u5219\u8868\u8fbe\u5f0f[a-z]{3}\u4e0d\u80fd\u5339\u914d&#xff0c;\u56e0\u4e3a\u5176\u4e2d\u5305\u542b\u5927\u5199\u5b57\u6bcdA\u3002<\/p>\n<p>&#xff08;2&#xff09;\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u5339\u914d&#xff1a;<\/p>\n<p>\u5728 Java \u4e2d&#xff0c;\u901a\u8fc7Pattern.CASE_INSENSITIVE\u6807\u5fd7\u5b9e\u73b0\u4e0d\u533a\u5206\u5927\u5c0f\u5199\u5339\u914d\u3002<\/p>\n<\/p>\n<h3 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">\u4e09\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u5206\u7ec4\u4e0e\u6355\u83b7<\/h3>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">3.1 \u5206\u7ec4\u7684\u6982\u5ff5\u4e0e\u7528\u9014<\/h4>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">&#xff08;1&#xff09;\u5206\u7ec4\u5b9a\u4e49&#xff1a;<\/h5>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f7f\u7528\u5706\u62ec\u53f7()\u5c06\u591a\u4e2a\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u7ec4\u5408\u5728\u4e00\u8d77&#xff0c;\u5f62\u6210\u4e00\u4e2a\u903b\u8f91\u5355\u5143\u3002\u4f8b\u5982(ab)&#043;&#xff0c;\u8868\u793aab\u8fd9\u4e2a\u7ec4\u5408\u53ef\u4ee5\u91cd\u590d\u4e00\u6b21\u6216\u591a\u6b21\u3002<\/p>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">&#xff08;2&#xff09;\u7528\u9014&#xff1a;<\/h5>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6539\u53d8\u4f18\u5148\u7ea7&#xff0c;\u4f7f\u62ec\u53f7\u5185\u7684\u90e8\u5206\u4f5c\u4e3a\u4e00\u4e2a\u6574\u4f53\u8fdb\u884c\u64cd\u4f5c&#xff1b;\u8fd8\u53ef\u7528\u4e8e\u540e\u7eed\u7684\u53cd\u5411\u5f15\u7528\u3002\u4f8b\u5982(a(bc))&#xff0c;\\\\1\u4ee3\u8868\u6574\u4e2aa(bc)&#xff0c;\\\\2\u4ee3\u8868bc\u3002\u4f8b\u5982&#xff0c;\u5bf9\u4e8e\u5b57\u7b26\u4e32&#034;abcabc&#034;&#xff0c;\u7528(abc)&#043;\u53ef\u4ee5\u5339\u914d\u6574\u4e2a\u5b57\u7b26\u4e32&#xff0c;\u56e0\u4e3aabc\u8fd9\u4e2a\u7ec4\u5408\u91cd\u590d\u4e86\u4e24\u6b21\u3002<\/p>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">3.2 \u6355\u83b7\u7ec4\u4e0e\u53cd\u5411\u5f15\u7528<\/h4>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">&#xff08;1&#xff09;\u6355\u83b7\u7ec4&#xff1a;<\/h5>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6bcf\u4e2a\u5206\u7ec4\u5c31\u662f\u4e00\u4e2a\u6355\u83b7\u7ec4&#xff0c;\u4ece\u5de6\u5230\u53f3&#xff0c;\u4ece 1 \u5f00\u59cb\u4e3a\u6bcf\u4e2a\u6355\u83b7\u7ec4\u7f16\u53f7\u3002\u4f8b\u5982\u5728(a(bc))\u4e2d&#xff0c;\u6709\u4e24\u4e2a\u6355\u83b7\u7ec4&#xff0c;(a(bc))\u662f\u7b2c 1 \u4e2a\u6355\u83b7\u7ec4&#xff0c;(bc)\u662f\u7b2c 2 \u4e2a\u6355\u83b7\u7ec4\u3002<\/p>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">&#xff08;2&#xff09;\u53cd\u5411\u5f15\u7528&#xff1a;<\/h5>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f7f\u7528\\\\n&#xff08;n \u4e3a\u6355\u83b7\u7ec4\u7f16\u53f7&#xff09;\u6765\u5f15\u7528\u4e4b\u524d\u6355\u83b7\u7ec4\u5339\u914d\u5230\u7684\u5185\u5bb9\u3002\u4f8b\u5982&#xff0c;\u6b63\u5219\u8868\u8fbe\u5f0f(ab)\\\\1&#xff0c;\u53ef\u4ee5\u5339\u914dabab&#xff0c;\u56e0\u4e3a\\\\1\u5f15\u7528\u4e86\u7b2c\u4e00\u4e2a\u6355\u83b7\u7ec4(ab)\u5339\u914d\u5230\u7684\u5185\u5bb9\u3002\u4f8b\u9898&#xff1a;\u5224\u65ad\u5b57\u7b26\u4e32&#034;xyxy&#034;\u80fd\u5426\u88ab(xy)\\\\1\u5339\u914d&#xff0c;\u7ed3\u679c\u662f\u53ef\u4ee5\u5339\u914d&#xff1b;\u5224\u65ad&#034;xyyx&#034;\u80fd\u5426\u88ab\u5339\u914d&#xff0c;\u7ed3\u679c\u662f\u4e0d\u80fd\u5339\u914d\u3002<\/p>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">3.3 \u975e\u6355\u83b7\u7ec4<\/h4>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">&#xff08;1&#xff09;\u975e\u6355\u83b7\u7ec4\u5b9a\u4e49&#xff1a;<\/h5>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f7f\u7528(?:)\u8868\u793a\u975e\u6355\u83b7\u7ec4&#xff0c;\u5b83\u53ea\u8d77\u5230\u5206\u7ec4\u7684\u4f5c\u7528&#xff0c;\u4e0d\u4f1a\u6355\u83b7\u5339\u914d\u7684\u5185\u5bb9&#xff0c;\u4e5f\u4e0d\u4f1a\u5206\u914d\u7ec4\u53f7\u3002\u4f8b\u5982(?:ab)&#043;&#xff0c;\u4e0e(ab)&#043;\u7c7b\u4f3c&#xff0c;\u4f46(?:ab)&#043;\u4e0d\u4f1a\u4ea7\u751f\u6355\u83b7\u7ec4\u3002<\/p>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">&#xff08;2&#xff09;\u7528\u9014&#xff1a;<\/h5>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5f53\u53ea\u9700\u8981\u5206\u7ec4\u6539\u53d8\u4f18\u5148\u7ea7&#xff0c;\u800c\u4e0d\u9700\u8981\u6355\u83b7\u5185\u5bb9\u65f6\u4f7f\u7528\u975e\u6355\u83b7\u7ec4&#xff0c;\u53ef\u4ee5\u63d0\u9ad8\u6548\u7387&#xff0c;\u51cf\u5c11\u8d44\u6e90\u5360\u7528\u3002\u4f8b\u5982&#xff0c;\u5bf9\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f(?:a|b)c&#xff0c;\u5b83\u5339\u914dac\u6216bc&#xff0c;\u4f46\u4e0d\u4f1a\u6355\u83b7a\u6216b\u3002\u4f8b\u9898&#xff1a;\u5728\u5b57\u7b26\u4e32&#034;ac&#034;\u3001&#034;bc&#034;\u3001&#034;abc&#034;\u4e2d&#xff0c;(?:a|b)c\u53ef\u4ee5\u5339\u914d&#034;ac&#034;\u548c&#034;bc&#034;&#xff0c;\u800c(a|b)c\u867d\u7136\u4e5f\u80fd\u5339\u914d&#034;ac&#034;\u548c&#034;bc&#034;&#xff0c;\u4f46\u4f1a\u4ea7\u751f\u6355\u83b7\u7ec4&#xff0c;\u5728\u4e00\u4e9b\u573a\u666f\u4e0b\u82e5\u4e0d\u9700\u8981\u6355\u83b7\u7ec4&#xff0c;\u4f7f\u7528(?:a|b)c\u66f4\u5408\u9002\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<h3 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">\u56db\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u5728Java\u4e2d\u7684\u5e94\u7528<\/h3>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">4.1\u4e3b\u8981\u7c7b\u4e0e\u65b9\u6cd5&#xff1a;<\/h4>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#xff08;1&#xff09;Pattern\u7c7b&#xff1a;\u8868\u793a\u7f16\u8bd1\u540e\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u677f&#xff0c;\u901a\u8fc7Pattern.compile(String regex)\u65b9\u6cd5\u7f16\u8bd1\u6b63\u5219\u8868\u8fbe\u5f0f&#xff0c;\u5f97\u5230Pattern\u5bf9\u8c61\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">&#xff08;2&#xff09;Matcher\u7c7b&#xff1a;\u7528\u4e8e\u6267\u884c\u5339\u914d\u64cd\u4f5c&#xff0c;\u901a\u8fc7Pattern.matcher(CharSequence input)\u65b9\u6cd5\u521b\u5efaMatcher\u5bf9\u8c61&#xff0c;\u5173\u8054\u8f93\u5165\u5b57\u7b26\u4e32\u3002<\/p>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">4.2Matcher\u7c7b\u7684\u5e38\u7528\u65b9\u6cd5&#xff1a;<\/h4>\n<ul>\n<li style=\"text-align:justify\">boolean find()&#xff1a;\u67e5\u627e\u8f93\u5165\u5b57\u7b26\u4e32\u4e2d\u662f\u5426\u6709\u5339\u914d\u7684\u5b50\u4e32&#xff0c;\u53ef\u591a\u6b21\u8c03\u7528&#xff0c;\u6bcf\u6b21\u627e\u4e0b\u4e00\u4e2a\u5339\u914d\u3002<\/li>\n<li style=\"text-align:justify\">boolean matches()&#xff1a;\u5224\u65ad\u6574\u4e2a\u8f93\u5165\u5b57\u7b26\u4e32\u662f\u5426\u5b8c\u5168\u5339\u914d\u6b63\u5219\u89c4\u5219\u3002<\/li>\n<li style=\"text-align:justify\">String group()&#xff1a;\u8fd4\u56de\u5f53\u524d\u5339\u914d\u5230\u7684\u6574\u4e2a\u5b50\u4e32\u3002<\/li>\n<li style=\"text-align:justify\">String group(int n)&#xff1a;\u8fd4\u56de\u7b2c n \u4e2a\u6355\u83b7\u7ec4\u5339\u914d\u5230\u7684\u5185\u5bb9&#xff0c;n &#061; 0 \u8868\u793a\u6574\u4e2a\u5339\u914d\u3002<\/li>\n<li style=\"text-align:justify\">int start()&#xff1a;\u8fd4\u56de\u5f53\u524d\u5339\u914d\u5b50\u4e32\u7684\u8d77\u59cb\u4e0b\u6807\u3002\u4f8b\u5982int startIndex &#061; matcher.start();\u3002<\/li>\n<li style=\"text-align:justify\">int end()&#xff1a;\u8fd4\u56de\u5f53\u524d\u5339\u914d\u5b50\u4e32\u7684\u7ed3\u675f\u4e0b\u6807&#xff08;exclusive&#xff0c;\u5373\u5b9e\u9645\u7ed3\u675f\u4f4d\u7f6e &#043; 1&#xff09;\u3002<\/li>\n<li style=\"text-align:justify\">String replaceAll(String replacement)&#xff1a;\u5c06\u6240\u6709\u5339\u914d\u7684\u5b50\u4e32\u66ff\u6362\u4e3a\u6307\u5b9a\u5b57\u7b26\u4e32\u3002<\/li>\n<li style=\"text-align:justify\">String replaceFirst(String replacement)&#xff1a;\u53ea\u66ff\u6362\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u5b50\u4e32\u3002<\/li>\n<\/ul>\n<h3 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">\u4e94\u3001\u6b63\u5219\u8868\u8fbe\u5f0f\u4e60\u9898&#xff08;\u6301\u7eed\u66f4\u65b0&#xff09;<\/h3>\n<h4>1.\u6570\u5b66\u8868\u8fbe\u5f0f\u89e3\u6790\u5668<\/h4>\n<h5>\u9898\u76ee&#xff1a;<\/h5>\n<p>\u7ed9\u51fa\u5982\u4e0b\u8868\u8fbe\u5f0f&#xff1a;x#y &#061; 2*x&#043;3*y&#043;4\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0x$y &#061; 3*x&#043;y&#043;2<\/p>\n<p>\u516c\u5f0f\u4e2d&#xff0c;$\u7684\u4f18\u5148\u7ea7\u9ad8\u4e8e#&#xff0c;\u76f8\u540c\u7684\u8fd0\u7b97\u7b26&#xff0c;\u6309\u4ece\u5de6\u5230\u53f3\u7684\u987a\u5e8f\u8ba1\u7b97\u3002\u7ed9\u5b9a\u8868\u8fbe\u5f0f\u8bf7\u8ba1\u7b97\u51fa\u7ed3\u679c<\/p>\n<h5>\u6b63\u5219\u8868\u8fbe\u5f0f\u4f7f\u7528\u601d\u8def&#xff1a;<\/h5>\n<ul>\n<li>\u76ee\u7684&#xff1a;\u89e3\u6790\u6570\u5b66\u8868\u8fbe\u5f0f&#xff0c;\u5148\u5904\u7406$\u8fd0\u7b97&#xff0c;\u518d\u5904\u7406#\u8fd0\u7b97<\/li>\n<\/ul>\n<ul>\n<li>\u6838\u5fc3\u601d\u60f3&#xff1a;\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u7279\u5b9a\u6a21\u5f0f&#xff0c;\u63d0\u53d6\u6570\u5b57\u8fdb\u884c\u8ba1\u7b97&#xff0c;\u7136\u540e\u66ff\u6362\u539f\u5b57\u7b26\u4e32\n<p>\/\/ \u5bfc\u5165\u6b63\u5219\u8868\u8fbe\u5f0f\u5305<br \/>\nimport java.util.regex.Matcher;<br \/>\nimport java.util.regex.Pattern;<\/p>\n<p>\/\/ \u7f16\u8bd1\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f<br \/>\nPattern pattern &#061; Pattern.compile(&#034;(\\\\\\\\d&#043;)\\\\\\\\$(\\\\\\\\d&#043;)&#034;);<\/p>\n<p>\/\/ \u521b\u5efa\u5339\u914d\u5668\u5e76\u5faa\u73af\u67e5\u627e<br \/>\nwhile (true) {<br \/>\n    Matcher matcher &#061; pattern.matcher(str);<br \/>\n    if (!matcher.find()) break;<\/p>\n<p>    \/\/ \u63d0\u53d6\u5339\u914d\u7684\u5185\u5bb9<br \/>\n    String subStr &#061; matcher.group(0);           \/\/ \u5b8c\u6574\u5339\u914d&#xff1a;&#034;4$5&#034;<br \/>\n    long x &#061; Long.parseLong(matcher.group(1));  \/\/ \u7b2c\u4e00\u4e2a\u6570\u5b57&#xff1a;4<br \/>\n    long y &#061; Long.parseLong(matcher.group(2));  \/\/ \u7b2c\u4e8c\u4e2a\u6570\u5b57&#xff1a;5<\/p>\n<p>    \/\/ \u66ff\u6362\u8ba1\u7b97\u7ed3\u679c<br \/>\n    str &#061; str.replaceFirst(subStr.replace(&#034;$&#034;, &#034;\\\\\\\\$&#034;), 3 * x &#043; y &#043; 2 &#043; &#034;&#034;);<br \/>\n}\n<\/li>\n<\/ul>\n<h3 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\"><\/h3>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">2.\u5b57\u7b26\u7c7b\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u5904\u7406<\/h4>\n<h5>\u9898\u76ee&#xff1a;<\/h5>\n<p>\u7ed9\u5b9a\u4e00\u6bb5\u201c\u5bc6\u6587\u201d\u5b57\u7b26\u4e32 s&#xff0c;\u5176\u4e2d\u5b57\u7b26\u90fd\u662f\u7ecf\u8fc7\u201c\u5bc6\u7801\u201d\u52a0\u5bc6\u7684&#xff0c;\u73b0\u9700\u8981\u5c06\u201c\u5bc6\u6587\u201d\u89e3\u5bc6\u5e76\u8f93\u51fa\u3002<\/p>\n<p>\u6620\u5c04\u7684\u89c4\u5219&#xff08;&#039;a&#039; ~ &#039;i&#039;&#xff09;\u5206\u522b\u7528&#xff08;&#039;1&#039; ~ &#039;9&#039;&#xff09;\u8868\u793a&#xff1b;&#xff08;&#039;j&#039; ~ &#039;z&#039;&#xff09;\u5206\u522b\u7528&#xff08;&#034;10*&#034;\u00a0~ &#034;26*&#034;&#xff09;\u8868\u793a\u3002<\/p>\n<h5>\u6b63\u5219\u8868\u8fbe\u5f0f\u4f7f\u7528\u601d\u8def&#xff1a;<\/h5>\n<ul>\n<li>\u76ee\u7684&#xff1a;\u89e3\u5bc6\u5bc6\u7801&#xff0c;\u6309\u7a7a\u683c\u548c\u661f\u53f7\u5206\u5272\u8f93\u5165\u5b57\u7b26\u4e32<\/li>\n<\/ul>\n<ul>\n<li>\u6838\u5fc3\u601d\u60f3&#xff1a;\u4f7f\u7528\u5b57\u7b26\u7c7b\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u591a\u79cd\u5206\u9694\u7b26\n<p>\/\/ \u4f7f\u7528\u5b57\u7b26\u7c7b\u6b63\u5219\u8868\u8fbe\u5f0f\u5206\u5272<br \/>\nString[] arrs &#061; str.split(&#034;[ \\\\\\\\*]&#043;&#034;);\n<\/li>\n<\/ul>\n<h4 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">3.\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u7684\u6700\u957f\u5408\u6cd5\u7b80\u5355\u6570\u5b66\u8868\u8fbe\u5f0f<\/h4>\n<h5 id=\"main-toc\">\u9898\u76ee&#xff1a;<\/h5>\n<p>\u63d0\u53d6\u5b57\u7b26\u4e32\u4e2d\u7684\u957f\u5ea6\u6700\u957f\u5408\u6cd5\u7b80\u5355\u6570\u5b66\u8868\u8fbe\u5f0f&#xff0c;\u5e76\u8ba1\u7b97\u8868\u8fbe\u5f0f\u7684\u503c\u3002\u5982\u679c\u6ca1\u6709&#xff0c;\u5219\u8fd4\u56de 0 \u3002<\/p>\n<p>\u7b80\u5355\u6570\u5b66\u8868\u8fbe\u5f0f\u53ea\u80fd\u5305\u542b\u4ee5\u4e0b\u5185\u5bb9&#xff1a;<\/p>\n<ul>\n<li>0-9\u6570\u5b57&#xff0c;\u7b26\u53f7&#043;-*<\/li>\n<\/ul>\n<p>\u8bf4\u660e&#xff1a;<\/p>\n<li>\u5982\u679c\u6709\u591a\u4e2a\u957f\u5ea6\u4e00\u6837\u7684&#xff0c;\u8bf7\u8fd4\u56de\u7b2c\u4e00\u4e2a\u8868\u8fbe\u5f0f\u7684\u7ed3\u679c<\/li>\n<li>\u64cd\u4f5c\u7b26\u4e0d\u80fd\u8fde\u7eed\u51fa\u73b0&#xff0c;\u5982 &#043;&#8211;&#043;1 \u662f\u4e0d\u5408\u6cd5\u7684<\/li>\n<h5 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">\u6b63\u5219\u8868\u8fbe\u5f0f\u4f7f\u7528\u601d\u8def&#xff1a;<\/h5>\n<ul>\n<li>\u76ee\u7684&#xff1a;\u00a0\u4ece\u5b57\u7b26\u4e32\u4e2d\u63d0\u53d6\u6700\u957f\u7684\u6709\u6548\u6570\u5b66\u8868\u8fbe\u5f0f\u5e76\u8ba1\u7b97\u7ed3\u679c<\/li>\n<li>\u6838\u5fc3\u601d\u60f3&#xff1a;\u00a0\u4f7f\u7528\u6355\u83b7\u7ec4\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u6570\u5b66\u8fd0\u7b97\u8868\u8fbe\u5f0f<\/li>\n<\/ul>\n<p>\/\/ \u4f7f\u7528\u6355\u83b7\u7ec4\u6b63\u5219\u8868\u8fbe\u5f0f\u5339\u914d\u6570\u5b66\u8fd0\u7b97<br \/>\nString regex01 &#061; &#034;([0-9]&#043;)\\\\\\\\&#043;([0-9]&#043;)&#034;;  \/\/ \u52a0\u6cd5\u8868\u8fbe\u5f0f<br \/>\nString regex02 &#061; &#034;([0-9]&#043;)-([0-9]&#043;)&#034;;    \/\/ \u51cf\u6cd5\u8868\u8fbe\u5f0f<br \/>\nString regex03 &#061; &#034;([0-9]&#043;)\\\\\\\\*([0-9]&#043;)&#034;;  \/\/ \u4e58\u6cd5\u8868\u8fbe\u5f0f<\/p>\n<p>\/\/ \u4e0b\u9762\u4ec5\u5bf9\u52a0\u6cd5\u8868\u8fbe\u5f0f\u8fdb\u884c\u6f14\u793a<br \/>\nPattern pattern01 &#061; Pattern.compile(regex01);<br \/>\nMatcher matcher01 &#061; pattern01.matcher(text);<br \/>\nif (matcher01.find()) {<br \/>\n    String fullMatch01 &#061; matcher01.group(0);                        \/\/ \u6574\u4e2a\u5f0f\u5b50<br \/>\n    int preExpression01 &#061; Integer.parseInt(matcher01.group(1));     \/\/ \u7b2c\u4e00\u90e8\u5206<br \/>\n    int rearExpression01 &#061; Integer.parseInt(matcher01.group(2));    \/\/ \u7b2c\u4e8c\u90e8\u5206<br \/>\n}<\/p>\n<h4>4.\u590d\u6742\u7684\u5b57\u7b26\u4e32\u7ec4\u5408\u7684\u5904\u7406<\/h4>\n<h5>\u9898\u76ee&#xff1a;<\/h5>\n<p>\u5bf9\u6570\u5b57&#xff0c;\u5b57\u7b26&#xff0c;\u6570\u5b57\u4e32&#xff0c;\u5b57\u7b26\u4e32&#xff0c;\u4ee5\u53ca\u6570\u5b57\u4e0e\u5b57\u7b26\u4e32\u7ec4\u5408\u8fdb\u884c\u5012\u5e8f\u6392\u5217\u3002<\/p>\n<li>\u5b57\u7b26\u8303\u56f4&#xff1a;\u7531 a \u5230 z&#xff0c; A \u5230 Z&#xff0c;<\/li>\n<li>\u6570\u5b57\u8303\u56f4&#xff1a;\u7531 0 \u5230 9<\/li>\n<p>\u7b26\u53f7\u7684\u5b9a\u4e49&#xff1a;<\/p>\n<ul>\n<li>\u201c-\u201d\u4f5c\u4e3a\u8fde\u63a5\u7b26\u4f7f\u7528\u65f6\u4f5c\u4e3a\u5b57\u7b26\u4e32\u7684\u4e00\u90e8\u5206&#xff0c;\u4f8b\u5982\u201c11-22\u201d\u4f5c\u4e3a\u4e00\u4e2a\u6574\u4f53\u5b57\u7b26\u4e32\u5448\u73b0&#xff1b;<\/li>\n<li>\u8fde\u7eed\u51fa\u73b0 2 \u4e2a \u201c-\u201d \u53ca\u4ee5\u4e0a\u65f6\u89c6\u4e3a\u5b57\u7b26\u4e32\u95f4\u9694\u7b26&#xff0c;\u5982\u201ca-b\u201d\u4e2d\u7684\u201d\u2013\u201c\u89c6\u4e3a\u95f4\u9694\u7b26&#xff0c;\u662f 2 \u4e2a\u72ec\u7acb\u6574\u4f53\u5b57\u7b26\u4e32\u201da\u201d\u548c\u201db\u201d&#xff1b;<\/li>\n<li>\u9664\u4e86 1&#xff0c;2 \u91cc\u9762\u5b9a\u4e49\u7684\u5b57\u7b26\u4ee5\u5916\u5176\u4ed6\u7684\u6240\u6709\u5b57\u7b26&#xff0c;\u5168\u90fd\u4f5c\u4e3a\u95f4\u9694\u7b26\u5904\u7406&#xff0c;\u5012\u5e8f\u540e\u95f4\u9694\u7b26\u4f5c\u4e3a\u7a7a\u683c\u5904\u7406&#xff1b;<\/li>\n<li>\u8981\u6c42\u5012\u6392\u540e\u7684\u5355\u8bcd\u95f4\u9694\u7b26\u4ee5\u4e00\u4e2a\u7a7a\u683c\u8868\u793a&#xff1b;\u5982\u679c\u6709\u591a\u4e2a\u95f4\u9694\u7b26\u65f6&#xff0c;\u53ea\u5141\u8bb8\u51fa\u73b0\u4e00\u4e2a\u7a7a\u683c<\/li>\n<\/ul>\n<h5>\u6b63\u5219\u8868\u8fbe\u5f0f\u4f7f\u7528\u601d\u8def&#xff1a;<\/h5>\n<ul>\n<li>\u76ee\u7684&#xff1a;\u00a0\u8bc6\u522b\u5408\u6cd5\u5355\u8bcd\u548c\u5206\u9694\u7b26&#xff0c;\u5012\u5e8f\u8f93\u51fa\u5355\u8bcd<\/li>\n<li>\u6838\u5fc3\u601d\u60f3&#xff1a;\u00a0\u4f7f\u7528\u5206\u7ec4\u6b63\u5219\u8868\u8fbe\u5f0f\u533a\u5206\u5408\u6cd5\u5355\u8bcd\u548c\u5206\u9694\u7b26\n<p>\/\/ \u4f7f\u7528\u5206\u7ec4\u6b63\u5219\u8868\u8fbe\u5f0f\u533a\u5206\u5355\u8bcd\u548c\u5206\u9694\u7b26<br \/>\n\/\/ 1. \u5b9a\u4e49\u6b63\u5219&#xff1a;\u5339\u914d\u201c\u5408\u6cd5\u5355\u8bcd\u201d&#xff08;\u542b\u5355\u4e2a&#039;-&#039;\u7684\u7ec4\u5408\u6216\u8005\u4e0d\u542b&#xff09;\u548c\u201c\u5206\u9694\u7b26\u201d&#xff08;\u8fde\u7eed&#8211;&#043;\u6216\u975e\u6cd5\u5b57\u7b26&#xff09;<br \/>\n\/\/    \u5206\u7ec41: \u5408\u6cd5\u5355\u8bcd&#xff08;\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u5355\u4e2a&#039;-&#039;\u7ec4\u5408&#xff09;<br \/>\n\/\/    \u5206\u7ec42: \u5206\u9694\u7b26&#xff08;\u8fde\u7eed&#8211;&#043;\u6216\u975e\u6cd5\u5b57\u7b26&#xff09;<br \/>\nPattern pattern &#061; Pattern.compile(&#034;([a-zA-Z0-9]&#043;(?:-[a-zA-Z0-9]&#043;)?)|([^a-zA-Z0-9-]|&#8211;&#043;)&#034;);<\/p>\n<p>\/*<br \/>\n * \u5bf9\u4e0a\u8ff0\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u89e3\u91ca&#xff1a;<br \/>\n * \u6574\u4f53\u7ed3\u6784\u4e3a (\u5206\u7ec41)|(\u5206\u7ec42)&#xff1b;\u4e3a\u6216\u7ed3\u6784<br \/>\n * &#xff08;1&#xff09;\u5206\u7ec41&#xff1a;([a-zA-Z0-9]&#043;(?:-[a-zA-Z0-9]&#043;)?)\u7684\u8bf4\u660e&#xff1a;<br \/>\n * \u975e\u6355\u83b7\u5206\u7ec4&#xff08;?: \u8868\u793a\u4e0d\u6355\u83b7\u8be5\u5206\u7ec4&#xff09;&#xff0c;\u6574\u4f53\u662f\u53ef\u9009\u7684&#xff08;\u6700\u591a\u51fa\u73b01\u6b21&#xff09;&#xff1a;<br \/>\n * -&#xff1a;\u5339\u914d\u5355\u4e2a\u77ed\u6a2a\u7ebf&#xff1b;<br \/>\n * [a-zA-Z0-9]&#043;&#xff1a;\u77ed\u6a2a\u7ebf\u540e\u5fc5\u987b\u63a5\u81f3\u5c111\u4e2a\u5b57\u6bcd\/\u6570\u5b57&#xff08;\u907f\u514d-\u51fa\u73b0\u5728\u7ed3\u5c3e&#xff09;&#xff1b;<br \/>\n * ?&#xff1a;\u91cf\u8bcd&#xff0c;\u8868\u793a\u6574\u4e2a\u5206\u7ec4\u201c\u51fa\u73b00\u6b21\u62161\u6b21\u201d&#xff08;\u5373\u6700\u591a\u53ea\u80fd\u6709\u4e00\u4e2a-&#xff09;\u3002<br \/>\n * &#xff08;2&#xff09;([^a-zA-Z0-9-]|&#8211;&#043;)<br \/>\n * [^&#8230;] \u8868\u793a \u201c\u975e\u5b57\u7b26\u96c6\u201d&#xff0c;\u5373\u5339\u914d\u9664\u4e86\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u5355\u4e2a-\u4e4b\u5916\u7684\u6240\u6709\u5b57\u7b26<br \/>\n * &#8211;&#043; \u6574\u4f53\u5339\u914d \u201c\u8fde\u7eed2\u4e2a\u53ca\u4ee5\u4e0a\u7684\u77ed\u6a2a\u7ebf\u201d&#xff08;\u5982 &#8211;\u3001&#8212; \u7b49&#xff09;<br \/>\n *\/<\/p>\n<p>Matcher matcher &#061; pattern.matcher(str);<br \/>\nwhile (matcher.find()) {<br \/>\n    String word &#061; matcher.group(1);       \/\/ \u5408\u6cd5\u5355\u8bcd<br \/>\n    String separator &#061; matcher.group(2);  \/\/ \u5206\u9694\u7b26<br \/>\n}<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb988\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u4f7f\u7528\u5706\u62ec\u53f7()\u5c06\u591a\u4e2a\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e00\u4e2a\u903b\u8f91\u5355\u5143\u3002\u4f8b\u5982(ab)+\uff0c\u8868\u793aab\u8fd9\u4e2a\u7ec4\u5408\u53ef\u4ee5\u91cd\u590d\u4e00\u6b21\u6216\u591a\u6b21\u3002\u4f7f\u7528(?:)\u8868\u793a\u975e\u6355\u83b7\u7ec4\uff0c\u5b83\u53ea\u8d77\u5230\u5206\u7ec4\u7684\u4f5c\u7528\uff0c\u4e0d\u4f1a\u6355\u83b7\u5339\u914d\u7684\u5185\u5bb9\uff0c\u4e5f\u4e0d\u4f1a\u5206\u914d\u7ec4\u53f7\u3002\u4f8b\u5982(?:ab)+\uff0c\u4e0e(ab)+\u7c7b\u4f3c\uff0c\u4f46(?:ab)+\u4e0d\u4f1a\u4ea7\u751f\u6355\u83b7\u7ec4\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,190,94],"topic":[],"class_list":["post-55067","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-190","tag-94"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/55067.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb988\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u4f7f\u7528\u5706\u62ec\u53f7()\u5c06\u591a\u4e2a\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e00\u4e2a\u903b\u8f91\u5355\u5143\u3002\u4f8b\u5982(ab)+\uff0c\u8868\u793aab\u8fd9\u4e2a\u7ec4\u5408\u53ef\u4ee5\u91cd\u590d\u4e00\u6b21\u6216\u591a\u6b21\u3002\u4f7f\u7528(?:)\u8868\u793a\u975e\u6355\u83b7\u7ec4\uff0c\u5b83\u53ea\u8d77\u5230\u5206\u7ec4\u7684\u4f5c\u7528\uff0c\u4e0d\u4f1a\u6355\u83b7\u5339\u914d\u7684\u5185\u5bb9\uff0c\u4e5f\u4e0d\u4f1a\u5206\u914d\u7ec4\u53f7\u3002\u4f8b\u5982(?:ab)+\uff0c\u4e0e(ab)+\u7c7b\u4f3c\uff0c\u4f46(?:ab)+\u4e0d\u4f1a\u4ea7\u751f\u6355\u83b7\u7ec4\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/55067.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-13T07:49:41+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55067.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/55067.html\",\"name\":\"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-13T07:49:41+00:00\",\"dateModified\":\"2025-08-13T07:49:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/55067.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/55067.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55067.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/55067.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb988\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u4f7f\u7528\u5706\u62ec\u53f7()\u5c06\u591a\u4e2a\u5b57\u7b26\u6216\u5b50\u8868\u8fbe\u5f0f\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e00\u4e2a\u903b\u8f91\u5355\u5143\u3002\u4f8b\u5982(ab)+\uff0c\u8868\u793aab\u8fd9\u4e2a\u7ec4\u5408\u53ef\u4ee5\u91cd\u590d\u4e00\u6b21\u6216\u591a\u6b21\u3002\u4f7f\u7528(?:)\u8868\u793a\u975e\u6355\u83b7\u7ec4\uff0c\u5b83\u53ea\u8d77\u5230\u5206\u7ec4\u7684\u4f5c\u7528\uff0c\u4e0d\u4f1a\u6355\u83b7\u5339\u914d\u7684\u5185\u5bb9\uff0c\u4e5f\u4e0d\u4f1a\u5206\u914d\u7ec4\u53f7\u3002\u4f8b\u5982(?:ab)+\uff0c\u4e0e(ab)+\u7c7b\u4f3c\uff0c\u4f46(?:ab)+\u4e0d\u4f1a\u4ea7\u751f\u6355\u83b7\u7ec4\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/55067.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-13T07:49:41+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/55067.html","url":"https:\/\/www.wsisp.com\/helps\/55067.html","name":"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-13T07:49:41+00:00","dateModified":"2025-08-13T07:49:41+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/55067.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/55067.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/55067.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4e00\u7bc7\u5e26\u4f60\u73a9\u8f6c\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Java\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=55067"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55067\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=55067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=55067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=55067"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=55067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}