{"id":361,"date":"2009-04-30T18:49:00","date_gmt":"2009-04-30T10:49:00","guid":{"rendered":""},"modified":"2013-11-17T19:32:15","modified_gmt":"2013-11-17T11:32:15","slug":"delphi2009%e4%b8%ad%e5%ae%89%e8%a3%85%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8ftperlregex%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/361.html","title":{"rendered":"Delphi2009\u4e2d\u5b89\u88c5\u6b63\u5219\u8868\u8fbe\u5f0fTPerlRegEx\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>\u5728 Delphi \u4e2d\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f, \u76ee\u524d PerlRegEx \u5e94\u8be5\u662f\u9996\u9009, \u51c6\u5907\u5f7b\u5e95\u800c\u7ec6\u81f4\u5730\u7814\u7a76\u5b83.<\/p>\n<p>\u5b98\u65b9\u7f51\u7ad9: <a href=\"http:\/\/www.regular-expressions.info\/delphi.html\">http:\/\/www.regular-expressions.info\/delphi.html<\/a><br \/>\n\u76f4\u63a5\u4e0b\u8f7d: <a href=\"http:\/\/www.regular-expressions.info\/download\/TPerlRegEx.zip\">http:\/\/www.regular-expressions.info\/download\/TPerlRegEx.zip<\/a><\/p>\n<p>\u5b89\u88c5\u65b9\u6cd5:<\/p>\n<p>1\u3001\u5148\u628a\u89e3\u538b\u7684 TPerlRegEx \u6587\u4ef6\u5939\u653e\u4e00\u4e2a\u5408\u9002\u7684\u5730\u65b9, \u6211\u653e\u5728\u4e86 Delphi \u7684 Imports \u76ee\u5f55\u4e2d.<\/p>\n<p>2\u3001\u76ee\u524d\u6700\u65b0 For Win32 \u7684\u7248\u672c\u662f\u5bf9 Delphi 2006 \u7684, 2007 \u4e5f\u80fd\u7528.<br \/>\n\u6253\u5f00 PerlRegExD2006.dpk, \u63d0\u793a\u7f3a\u5c11\u8d44\u6e90\u6587\u4ef6, \u6ca1\u5173\u7cfb;<br \/>\n\u5728 Project Manager \u7a97\u53e3\u4e2d\u7684 PerlRegExD2006.bpl \u4e0a\u70b9\u51fb\u53f3\u952e, \u6267\u884c Install;<br \/>\n\u8fd9\u65f6\u5728 Tool Palette \u7684\u5217\u8868\u4e2d\u5df2\u7ecf\u6709\u4e86 TPerlRegEx, \u5728 JGsoft \u7ec4.<\/p>\n<p>3\u3001Tools -&gt; Options -&gt; Environment Options -&gt; Delphi Options -&gt; Library-Win32 -&gt; Library path -&gt;<br \/>\n\u6dfb\u52a0\u8def\u5f84: &#8230;\\Imports\\TPerlRegEx<\/p>\n<p>4\u3001\u53ef\u4ee5\u4f7f\u7528\u4e86! \u76f4\u63a5 uses PerlRegEx \u6216\u4ece Tool Palette \u6dfb\u52a0\u90fd\u53ef\u4ee5.<br \/>\n\u5982\u679c\u4e0d\u559c\u6b22 Tool Palette \u7684\u6dfb\u52a0\u65b9\u5f0f\u53ef\u4ee5\u7701\u7565\u7b2c\u4e8c\u6b65.<\/p>\n<p>\u5b89\u88c5\u540e\u53d1\u73b0\uff0c\u9700\u8981 pcre3.dll \u6587\u4ef6\uff0c \u5b98\u7f51\u4e0a\u8bf4\u751f\u6210\u7684\u7a0b\u5e8f\u53ef\u4ee5\u4e0d\u7528\u8fd9\u4e2aDLL\u6587\u4ef6\u7684\u3002<br \/>\n\u770b\u4e86\u4e00\u4e0b\u7a0b\u5e8f\u53d1\u73b0\uff0c\u5b83\u9ed8\u8ba4\u7684\u662f\u4f7f\u7528 7.0 \u7684\u65b9\u5f0f\uff0c\u4e5f\u5c31\u662f\u4f7f\u7528 pcre3.dll \u6587\u4ef6\u3002<br \/>\nDelphi2009\u7684\u8bdd\uff0c\u53ef\u4ee5\u66f4\u6539\u4e00\u4e0b\u8bbe\u7f6e\u4f7f\u7528OBJ\u94fe\u63a5\u5e93\u5373\u53ef\u3002<br \/>\n\u5728pcre.pas\u91cc\uff0c\u6709\u5982\u4e0b\u51e0\u53e5<\/p>\n<pre class=\"brush: delphi; title: ; notranslate\" title=\"\">\r\n\/\/ Define PCRE_STATICLINK to link the OBJ files with PCRE 7.7.\r\n\/\/ Due to bugs in the Delphi compiler, you may get an internal error if install TPerlRegEx into a design time package,\r\n\/\/ and you don't put TPerlRegEx into a runtime package either.\r\n\/\/ You can use PCRE_STATICLINK if you don't use packages at all (which means you don't install it into the IDE and you don't drop TPerlRegEx on a form)\r\n\/\/ You can also use PCRE_STATICLINK if you put the component into a runtime package\r\n\/\/{$DEFINE PCRE_STATICLINK}\/\/ Define PCRE_LINKDLL to use pcre3.dll\r\n{$DEFINE PCRE_LINKDLL}\r\n\/\/------------------------\u6539\u4e3a\u4e0b\u9762\u8fd9\u6837------------------------\r\n{$DEFINE PCRE_STATICLINK}\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ \u53bb\u6389\u539f\u5148\u7684\u6ce8\u91ca\uff0c\u4f7f\u75287.7\u7248\u672c\r\n\/\/{$DEFINE PCRE_LINKDLL}\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ \u52a0\u4e0a\u6ce8\u91ca \u4e0d\u75287.0\u7248\u672c\u4e86\r\n<\/pre>\n<p>\u4fee\u6539\u540e\uff0c\u91cd\u65b0\u7f16\u8bd1\u5b89\u88c5\u8fd9\u4e2a\u63a7\u4ef6\uff0c\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Delphi \u4e2d\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f, \u76ee\u524d PerlRegEx \u5e94\u8be5\u662f\u9996\u9009, \u51c6\u5907\u5f7b\u5e95\u800c\u7ec6\u81f4\u5730\u7814\u7a76\u5b83. \u5b98\u65b9\u7f51 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-361","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":1,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"predecessor-version":[{"id":4769,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/361\/revisions\/4769"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}