cvs: phpdoc /ja/functions network.xml nis.xml oci8.xml openssl.xml oracle.xml outcontrol.xml pcntl.xml pcre.xml pdf.xml pfpro.xml pgsql.xml posix.xml
printer.xml pspell.xml readline.xml recode.xml regex.xml
| From: | Rui Hirokawa | Date: | Sat, 26 Jan 2002 15:38:35 +0000 |
| Subject: | cvs: phpdoc /ja/functions network.xml nis.xml oci8.xml openssl.xml oracle.xml outcontrol.xml pcntl.xml pcre.xml pdf.xml pfpro.xml pgsql.xml posix.xml printer.xml pspell.xml readline.xml recode.xml regex.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969341636@lists.php.net to get a copy of this message | ||
hirokawa Sat Jan 26 10:38:35 2002 EDT
Modified files:
/phpdoc/ja/functions network.xml nis.xml oci8.xml openssl.xml
oracle.xml outcontrol.xml pcntl.xml pcre.xml
pdf.xml pfpro.xml pgsql.xml posix.xml
printer.xml pspell.xml readline.xml recode.xml
regex.xml
Log:
update translation.
Index: phpdoc/ja/functions/network.xml diff -u phpdoc/ja/functions/network.xml:1.23 phpdoc/ja/functions/network.xml:1.24 --- phpdoc/ja/functions/network.xml:1.23 Sat Jan 26 03:55:51 2002 +++ phpdoc/ja/functions/network.xml Sat Jan 26 10:38:31 2002 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.23 $ --> +<!-- $Revision: 1.24 $ --> <reference id="ref.network"> - <title>ãããã¯ã¼ã¯é¢æ°</title> + <title>ãããã¯ã¼ã¯é¢æ°(network)</title> <titleabbrev>ãããã¯ã¼ã¯</titleabbrev> <refentry id="function.checkdnsrr"> @@ -213,16 +213,20 @@ <example> <title><function>fsockopen</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ +<?php $fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30); if (!$fp) { - echo "$errstr ($errno)<br>\n"; + echo "$errstr ($errno)<br>\n"; } else { - fputs ($fp, "GET / HTTP/1.0\r\n\r\n"); - while (!feof($fp)) { - echo fgets ($fp,128); - } - fclose ($fp); + fputs ($fp, "GET / HTTP/1.0\r\nHost: www.php.net\r\n\r\n"); + while (!feof($fp)) { + echo fgets ($fp,128); + } + fclose ($fp); } +?> +]]> </programlisting> </example> 以ä¸ã®ä¾ã¯ãèªåã®ãã·ã³ã®UDPãµã¼ãã¹ "daytime" (ãã¼ã13)ããæ¥ @@ -230,16 +234,18 @@ <example> <title>UDPæ¥ç¶ã®ä½¿ç¨æ³</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $fp = fsockopen("udp://127.0.0.1", 13, $errno, $errstr); if (!$fp) { - echo "ERROR: $errno - $errstr<br>\n"; + echo "ERROR: $errno - $errstr<br>\n"; } else { fwrite($fp,"\n"); echo fread($fp, 26); fclose($fp); } -?> +?> +]]> </programlisting> </example> <note> @@ -511,12 +517,14 @@ <example> <title><function>ip2long</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $ip = gethostbyname("www.php.net"); -$out = "The following URLs are equivalent:<br>\n"; -$out .= "http://www.php.net/, http://".$ip."/, and http://".ip2long($ip)."/<br>\n"; +$out = "The following URLs are equivalent:<br>\n"; +$out .= "http://www.php.net/, http://".$ip."/, and http://".sprintf("%u",ip2long($ip))."/<br>\n"; echo $out; -?> +?> +]]> </programlisting> </example> </para> @@ -526,11 +534,13 @@ <example> <title>IPã¢ãã¬ã¹ã®è¡¨ç¤º</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $ip = gethostbyname("www.php.net"); -printf ("%u\n", ip2long ($ip)); +printf("%u\n", ip2long($ip)); echo $out; -?> +?> +]]> </programlisting> </example> </para> @@ -870,8 +880,9 @@ <example> <title><function>socket_set_timeout</function>ã®ä¾</title> <programlisting role="php"> -<?php -$fp = fsockopen("http://www.php.net", 80); +<![CDATA[ +<?php +$fp = fsockopen("www.php.net", 80); if(!$fp) { echo "Unable to open\n"; } else { @@ -883,7 +894,8 @@ fclose($fp); print $res; } -?> +?> +]]> </programlisting> </example> </para> @@ -971,11 +983,12 @@ <example> <title><function>syslog</function>ã®ä½¿ç¨ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php define_syslog_variables(); // syslogããªã¼ãã³ããããã»ã¹IDãã¤ã³ã¯ã«ã¼ãããæ¨æºã¨ã©ã¼åºåã«ã // ãã°ãåºåãã¾ããããã¦ãã¦ã¼ã¶å®ç¾©ã®ãã°è¨é²æ©æ§ã使ç¨ãã¾ãã -openlog("myScripLog", LOG_PID | LOG_PERROR, LOG_LOCAL0); +openlog("myScripLog", LOG_PID | LOG_PERROR, LOG_LOCAL0); // ä½ããã®ã³ã¼ã @@ -984,12 +997,13 @@ } else { // ã¯ã©ã¤ã¢ã³ãã¯æªèªè¨¼! // ãã°ãè¨é²ãã - $access = date("Y/m/d H:i:s"); - syslog(LOG_WARNING,"Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)"); + $access = date("Y/m/d H:i:s"); + syslog(LOG_WARNING,"Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)"); } closelog(); -?> +?> +]]> </programlisting> </example> ã¦ã¼ã¶å®ç¾©ã®ãã°ãã³ãã©ã®è¨å®ã«é¢ããæ å ±ã«ã¤ãã¦ã¯ãUNIXãã㥠Index: phpdoc/ja/functions/nis.xml diff -u phpdoc/ja/functions/nis.xml:1.13 phpdoc/ja/functions/nis.xml:1.14 --- phpdoc/ja/functions/nis.xml:1.13 Wed Dec 12 15:53:25 2001 +++ phpdoc/ja/functions/nis.xml Sat Jan 26 10:38:31 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.14 $ --> <reference id="ref.nis"> <title>YP/NIS颿°</title> <titleabbrev>YP/NIS</titleabbrev> @@ -31,10 +32,9 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>yp_get_default_domain</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> - <para> <function>yp_get_default_domain</function> ã¯ããã¼ãã®ããã©ã«ã ãã¡ã¤ã³ã¾ã㯠&false; ãè¿ãã¾ããè¿ãå¤ã¯ããã®å¾ã® NIS ã³ã¼ã«ã§ @@ -49,22 +49,21 @@ <example> <title>ããã©ã«ããã¡ã¤ã³ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $domain = yp_get_default_domain(); - -echo "ããã©ã«ãã®NIS ãã¡ã¤ã³: " . $domain; +echo "Default NIS domain is: " . $domain; ?> +]]> </programlisting> </example> </para> - - <para> - <function>yp-get-default-domain</function> ãåç §ä¸ããã <!-- - linkend="function.yp-errno">yp_errno</link> and <link - linkend="function.yp-err-string">yp_err_string</link> ---> + <para> + See also: <link linkend="function.yp-errno">yp_errno</link> and + <link linkend="function.yp-err-string">yp_err_string</link> </para> +--> </refsect1> </refentry> @@ -82,25 +81,20 @@ <paramdef>string <parameter>map</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> <function>yp_order</function> ã¯ããããã®å¼åºçªå·ã¾ãã¯&false; ã è¿ãã¾ãã </para> <para> <example> - <title>NIS å¼åºçªå·ã®ä¾</title> + <title>NISå¼åºçªå·ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $number = yp_order($domain,$mapname); - - if(!$number) { - echo "ã¨ã³ããªãè¦ã¤ããã¾ãã\n"; - <!-- echo yp_errno() . ": " . yp_err_string(); --> - } - - echo "ãã®ãããã®å¼åºçªå·ã¯ã" . $number . "ã§ãã"; + echo "Order number for this map is: " . $number; ?> +]]> </programlisting> </example> </para> @@ -138,11 +132,12 @@ <example> <title>NIS ãã¹ã¿ã¼ã®ä¾</title> <programlisting role="php"> -<?php - $number = yp_master ($domain, $mapname); - - echo "ãã®NISãããã®ãã¹ã¿: " . $master; +<![CDATA[ +<?php +$number = yp_master ($domain, $mapname); +echo "Master for this map is: " . $master; ?> +]]> </programlisting> </example> </para> @@ -180,11 +175,12 @@ <example> <title>NIS æ¤ç´¢ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $entry = yp_match ($domain, "passwd.byname", "joe"); - -echo "æ¤ç´¢ã«ãããããã¨ã³ããª: " . $entry; +echo "Matched entry is: " . $entry; ?> +]]> </programlisting> </example> </para> @@ -200,7 +196,6 @@ linkend="function.yp-err-string">yp_err_string</link> --> </para> - </refsect1> </refentry> @@ -220,7 +215,6 @@ <paramdef>string <parameter>map</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> <function>yp_first</function> ã¯ããã¡ã¤ã³ <parameter>domain</parameter>ã®ããã<parameter>map</parameter>ã @@ -230,13 +224,14 @@ <example> <title>NIS first ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $entry = yp_first($domain, "passwd.byname"); $key = $entry ["key"]; $value = $entry ["value"]; -echo "ãã®ãããã®æåã®ã¨ã³ããªã«ã¯ãã¼ " . $key . " ã¨å¤ " . $value - . "ãããã¾ãã"; +echo "First entry in this map has key " . $key . " and value " . $value; ?> +]]> </programlisting> </example> </para> @@ -273,18 +268,21 @@ <example> <title>NIS next ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $entry = yp_next ($domain, "passwd.byname", "joe"); -if(!$entry) { - echo yp_errno() . ": " . yp_err_string(); +if (!$entry) { + echo "No more entries found\n"; + <!-- echo yp_errno() . ": " . yp_err_string(); --> } -$key = key($entry); +$key = key ($entry); -echo "joe ã®æ¬¡ã®ã¨ã³ããªã®ãã¼ã¯ã" . $key - . " ãå¤ã¯ " . $entry[$key] . "ã§ãã"; +echo "The next entry after joe has key " . $key + . " and value " . $entry[$key]; ?> +]]> </programlisting> </example> </para> @@ -298,7 +296,6 @@ </refsect1> </refentry> -<!-- Function doesn't exist <refentry id="function.yp-errno"> <refnamediv> <refname>yp_errno</refname> @@ -344,10 +341,6 @@ </refsect1> </refentry> ---> - -<!-- Function doesn't exist - <refentry id="function.yp-err-string"> <refnamediv> <refname>yp_err_string</refname> @@ -359,30 +352,75 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>yp_err_string</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> - <para> - <function>yp_err_string</function> ã¯ãåã®æä½ã«é¢ããã¨ã©ã¼ã¡ãã»ã¼ã¸ - ãè¿ãã¾ããä½ãæªãããæ£ç¢ºã«èª¿ã¹ãéã«ä¾¿å©ã§ãã</para> - + <function>yp_err_string</function> ã¯ãåã®æä½ã«é¢ããã¨ã©ã¼ã¡ã + ã»ã¼ã¸ãè¿ãã¾ããä½ãæªãããæ£ç¢ºã«èª¿ã¹ãéã«ä¾¿å©ã§ãã + </para> <para> <example> <title>NIS ã¨ã©ã¼ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php echo "Error: " . yp_err_string(); ?> +]]> </programlisting> - </example></para> + </example> + </para> <para> <function>yp_errno</function>ãåç §ä¸ããã </para> </refsect1> </refentry> ---> + <refentry id='function.yp-all'> + <refnamediv> + <refname>yp_all</refname> + <refpurpose> + ããããèµ°æ»ããåã¨ã³ããªã®é¢æ°ãã³ã¼ã«ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>yp_all</function></funcdef> + <paramdef>string <parameter>domain</parameter></paramdef> + <paramdef>string <parameter>map</parameter></paramdef> + <paramdef>string <parameter>callback</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.yp-cat'> + <refnamediv> + <refname>yp_cat</refname> + <refpurpose> + ã¨ã³ããªããããå«ãé åãè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>yp_cat</function></funcdef> + <paramdef>string <parameter>domain</parameter></paramdef> + <paramdef>string <parameter>map</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> </reference> Index: phpdoc/ja/functions/oci8.xml diff -u phpdoc/ja/functions/oci8.xml:1.19 phpdoc/ja/functions/oci8.xml:1.20 --- phpdoc/ja/functions/oci8.xml:1.19 Wed Dec 12 15:53:25 2001 +++ phpdoc/ja/functions/oci8.xml Sat Jan 26 10:38:33 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> - +<!-- $Revision: 1.20 $ --> <reference id="ref.oci8"> <title>Oracle 8 颿°</title> <titleabbrev>OCI8</titleabbrev> @@ -65,15 +65,17 @@ </para> <para> <informalexample> - <programlisting> -> ldd /www/apache/bin/httpd + <screen> +<![CDATA[ +# ldd /www/apache/bin/httpd libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000) libm.so.6 => /lib/libm.so.6 (0x4002f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000) libdl.so.2 => /lib/libdl.so.2 (0x4007a000) libc.so.6 => /lib/libc.so.6 (0x4007e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) - </programlisting> +]]> + </screen> </informalexample> </para> <para> @@ -82,13 +84,15 @@ </para> <para> <informalexample> - <programlisting> -> cd /usr/src/apache_1.3.xx -> make clean -> LIBS=-lpthread ./config.status -> make -> make install - </programlisting> + <screen> +<![CDATA[ +# cd /usr/src/apache_1.3.xx +# make clean +# LIBS=-lpthread ./config.status +# make +# make install +]]> + </screen> </informalexample> </para> </note> @@ -96,7 +100,8 @@ <example> <title>OCIã«é¢ãããã³ã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // by sergo@bacup.ru // ã³ãã³ãã®å®è¡ãé å»¶ãããã«ã¯ããªãã·ã§ã³ OCI_DEFAULT ã使ç¨ã㦠@@ -114,11 +119,13 @@ field2 = empty_clob()) returning field2 into :field2"; OCIParse($conn, $sql); $clob = OCINewDescriptor($conn, OCI_D_LOB); -OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); +OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); OCIExecute($stmt, OCI_DEFAULT); $clob->save ("some text"); +OCICommit($conn); -?> +?> +]]> </programlisting> </example> </para> @@ -128,7 +135,8 @@ <example> <title>ã¹ãã¢ãããã·ã¼ã¸ã£ã®ä½¿ç¨æ³</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // by webmaster@remoterealty.com $sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', '$lastname', '$company', '$address1', '$address2', '$city', '$state', @@ -142,44 +150,13 @@ OCIBindByName ( $sth, ":error_code", $errorcode, 10 ); OCIExecute ( $sth ); -?> +?> +]]> </programlisting> </example> </para> </partintro> -<!-- - -OCIBindByName -OCIDefineByName -OCIColumnIsNULL -OCIColumnName -OCIColumnSize -OCIColumnType -OCIExecute -OCIFetch -OCIFetchInto -OCIFetchStatement -OCIInternalDebug -OCILogoff -OCILogon -OCIPLogon -OCINLogon -OCIError -OCICommit -OCIRollback -OCINewCursor -OCINewDescriptor -OCIRowCount -OCINumCols -OCIParse -OCIResult -OCIServerVersion -OCIStatementType -OCIFreeStatement -OCIFreeCursor ---> - <refentry id="function.ocidefinebyname"> <refnamediv> <refname>OCIDefineByName</refname> @@ -192,7 +169,7 @@ <funcdef>int <function>OCIDefineByName</function></funcdef> <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>Column-Name</parameter></paramdef> - <paramdef>mixed &<parameter>variable</parameter></paramdef> + <paramdef>mixed <parameter>variable</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>type</optional></replaceable> @@ -210,16 +187,16 @@ select æã«ãªã夿°ãå®ç¾©ããå ´åã¯ãã¨ã©ã¼ã¯çºçããªãã§ããã! </para> <para> - æ½è±¡ Datatype (LOB/ROWID/BFILE) ãå®ç¾©ããå¿ è¦ãããå ´åã - ã¾ã <function>OCINewDescriptor</function> 颿°ãç¨ãã¦ãã® - é åã確ä¿ããå¿ è¦ãããã¾ãã - <function>OCIBindByName</function> 颿°ãåç §ä¸ããã - + æ½è±¡ Datatype (LOB/ROWID/BFILE) ãå®ç¾©ããå¿ è¦ãããå ´åã + ã¾ã <function>OCINewDescriptor</function> 颿°ãç¨ãã¦ãã® + é åã確ä¿ããå¿ è¦ãããã¾ãã + <function>OCIBindByName</function> 颿°ãåç §ä¸ããã </para> - <example> + <example> <title>OCIDefineByName</title> <programlisting> -<?php +<![CDATA[ +<?php /* OCIDefineByPos ã®ä¾ thies@thieso.net (980219) */ $conn = OCILogon("scott","tiger"); @@ -228,8 +205,8 @@ /* the define MUST be done BEFORE ociexecute! */ -OCIDefineByName($stmt,"EMPNO",&$empno); -OCIDefineByName($stmt,"ENAME",&$ename); +OCIDefineByName($stmt,"EMPNO",$empno); +OCIDefineByName($stmt,"ENAME",$ename); OCIExecute($stmt); @@ -240,8 +217,10 @@ OCIFreeStatement($stmt); OCILogoff($conn); -?></programlisting></example> - +?> +]]> + </programlisting> + </example> </refsect1> </refentry> @@ -258,7 +237,7 @@ <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>ph_name</parameter></paramdef> <paramdef>mixed &<parameter>variable</parameter></paramdef> - <paramdef>int<parameter>length</parameter></paramdef> + <paramdef>int <parameter>length</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>type</optional></replaceable> @@ -278,22 +257,23 @@ ã¾ãã </para> <para> - æ½è±¡ãã¼ã¿å (LOB/ROWID/BFILE) ããã¤ã³ãããå¿ è¦ãããå ´åã - ã¾ã <function>OCINewDescriptor</function> 颿°ã使ç¨ãã¦ããã確ä¿ãã - å¿ è¦ãããã¾ãã - <parameter>length</parameter> ã¯æ½è±¡ãã¼ã¿åç¨ã«ã¯ä½¿ç¨ãããã-1 ãè¨å®ããå¿ è¦ãããã¾ãã - <parameter>type</parameter> 夿°ã¯ä½¿ç¨ããããã£ã¹ã¯ãªãã¿ã®ç¨®é¡ã Oracle ã«ä¼ãã¾ãã - 使ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã: OCI_B_FILE (Binary-File), OCI_B_CFILE - (Character-File), OCI_B_CLOB (Character-LOB), OCI_B_BLOB - (Binary-LOB) ,OCI_B_ROWID (ROWID) + æ½è±¡ãã¼ã¿å (LOB/ROWID/BFILE) ããã¤ã³ãããå¿ è¦ãããå ´åãã¾ã + <function>OCINewDescriptor</function> 颿°ã使ç¨ãã¦ããã確ä¿ãã + å¿ è¦ãããã¾ãã<parameter>length</parameter> ã¯æ½è±¡ãã¼ã¿åç¨ã«ã¯ + 使ç¨ãããã-1 ãè¨å®ããå¿ è¦ãããã¾ãã + <parameter>type</parameter> 夿°ã¯ä½¿ç¨ããããã£ã¹ã¯ãªãã¿ã®ç¨®é¡ + ãOracle ã«ä¼ãã¾ãã使ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã: + OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), OCI_B_CLOB + (Character-LOB), OCI_B_BLOB (Binary-LOB) ,OCI_B_ROWID (ROWID) </para> <example> <title>OCIDefineByName</title> <programlisting> -<?php +<![CDATA[ +<?php /* OCIBindByPos ã®ä¾ thies@thieso.net (980221) - - 3 ã¬ã³ã¼ãã emp ã«æ¿å ¥ããæ¿å ¥ã®ç´å¾ã«ã¬ã³ã¼ããæ´æ°ããããã« ROWID ã使ç¨ãã¾ãã + 3ã¬ã³ã¼ããempã«æ¿å ¥ããæ¿å ¥ã®ç´å¾ã«ã¬ã³ã¼ããæ´æ°ããããã« + ROWIDã使ç¨ãã¾ãã */ $conn = OCILogon("scott","tiger"); @@ -306,13 +286,13 @@ $rowid = OCINewDescriptor($conn,OCI_D_ROWID); -OCIBindByName($stmt,":empno",&$empno,32); -OCIBindByName($stmt,":ename",&$ename,32); -OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID); +OCIBindByName($stmt,":empno",&$empno,32); +OCIBindByName($stmt,":ename",&$ename,32); +OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID); $update = OCIParse($conn,"update emp set sal = :sal where ROWID = :rid"); -OCIBindByName($update,":rid",&$rowid,-1,OCI_B_ROWID); -OCIBindByName($update,":sal",&$sal,32); +OCIBindByName($update,":rid",&$rowid,-1,OCI_B_ROWID); +OCIBindByName($update,":sal",&$sal,32); $sal = 10000; @@ -328,7 +308,7 @@ $stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)"); OCIExecute($stmt); -while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) { +while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) { var_dump($arr); } OCIFreeStatement($stmt); @@ -340,6 +320,7 @@ OCILogoff($conn); ?> +]]> </programlisting> </example> <warning> @@ -395,16 +376,16 @@ <example> <title>OCILogon</title> <programlisting> -<?php -print "<HTML><PRE>"; +<![CDATA[ +<?php +print "<HTML><PRE>"; $db = ""; $c1 = ocilogon("scott","tiger",$db); $c2 = ocilogon("scott","tiger",$db); function create_table($conn) -{ - $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); +{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); ociexecute($stmt); echo $conn." created table\n\n"; } @@ -416,8 +397,7 @@ } function insert_data($conn) -{ - $stmt = ociparse($conn,"insert into scott.hallo +{ $stmt = ociparse($conn,"insert into scott.hallo values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); ociexecute($stmt,OCI_DEFAULT); echo $conn." inserted hallo\n\n"; @@ -431,7 +411,7 @@ function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." committed\n\n"; } function rollback($conn) @@ -444,51 +424,56 @@ ociexecute($stmt,OCI_DEFAULT); echo $conn."----selecting\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; echo $conn."----done\n\n"; } create_table($c1); -insert_data($c1); // c1 ãç¨ãã¦è¡ãæ¿å ¥ -insert_data($c2); // c2 ãç¨ãã¦è¡ãæ¿å ¥ +insert_data($c1); // Insert a row using c1 +insert_data($c2); // Insert a row using c2 -select_data($c1); // 両æ¹ã®æ¿å ¥ã®çµæãè¿ã +select_data($c1); // Results of both inserts are returned select_data($c2); -rollback($c1); // c1 ãç¨ãã¦ãã¼ã«ãã㯠+rollback($c1); // Rollback using c1 -select_data($c1); // 両æ¹ã®æ¿å ¥ããã¼ã«ããã¯ããã +select_data($c1); // Both inserts have been rolled back select_data($c2); -insert_data($c2); // c2 ãç¨ãã¦è¡ãæ¿å ¥ -commit($c2); // c2 ãç¨ãã¦ã³ããã +insert_data($c2); // Insert a row using c2 +commit($c2); // commit using c2 -select_data($c1); // æ¿å ¥ c2 ã®çµæãè¿ããã +select_data($c1); // result of c2 insert is returned -delete_data($c1); // c1 ãç¨ãã¦ãã¼ãã«ã®å ¨ã¦ã®è¡ãåé¤ -select_data($c1); // è¡ãè¿ããªã -select_data($c2); // è¡ãè¿ããªã -commit($c1); // c1 ãç¨ãã¦ã³ããã +delete_data($c1); // delete all rows in table using c1 +select_data($c1); // no rows returned +select_data($c2); // no rows returned +commit($c1); // commit using c1 -select_data($c1); // è¡ãè¿ããªã -select_data($c2); // è¡ãè¿ããªã +select_data($c1); // no rows returned +select_data($c2); // no rows returned drop_table($c1); -print "</PRE></HTML>"; -?></programlisting></example></para> +print "</PRE></HTML>"; +?> +]]> + </programlisting> + </example> + </para> <simpara> <function>OCIPLogon</function> ããã³ - <function>OCINLogon</function> ãåç §ä¸ããã</simpara> + <function>OCINLogon</function> ãåç §ä¸ããã + </simpara> </refsect1> </refentry> - + <refentry id="function.ociplogon"> <refnamediv> <refname>OCIPLogon</refname> <refpurpose> - æç¶çæ¥ç¶ã使ç¨ãã¦Oracle ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã°ãªã³ããã - æ°ããã»ãã·ã§ã³ãè¿ãã + æç¶çæ¥ç¶ã使ç¨ãã¦Oracle ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã°ãªã³ããã + æ°ããã»ãã·ã§ã³ãè¿ãã </refpurpose> </refnamediv> <refsect1> @@ -516,7 +501,8 @@ </para> <simpara> <function>OCILogon</function> ããã³ - <function>OCINLogon</function> ãåç §ä¸ããã</simpara> + <function>OCINLogon</function> ãåç §ä¸ããã + </simpara> </refsect1> </refentry> @@ -564,94 +550,89 @@ 以ä¸ã®ä¾ã¯ãæ¥ç¶ãã©ã®ããã«åå²ããããã示ããã®ã§ãã <example> <title>OCINLogon</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>"; + <programlisting> +<![CDATA[ +<?php +print "<HTML><PRE>"; $db = ""; -$c1 = ocilogon ("scott", "tiger", $db); -$c2 = ocinlogon ("scott", "tiger", $db); +$c1 = ocilogon("scott","tiger",$db); +$c2 = ocinlogon("scott","tiger",$db); function create_table($conn) -{ - $stmt = ociparse ($conn, "create table scott.hallo (test - varchar2(64))"); - ociexecute ($stmt); +{ $stmt = ociparse($conn,"create table scott.hallo (test +varchar2(64))"); + ociexecute($stmt); echo $conn." created table\n\n"; } function drop_table($conn) -{ - $stmt = ociparse ($conn,"drop table scott.hallo"); - ociexecute ($stmt); +{ $stmt = ociparse($conn,"drop table scott.hallo"); + ociexecute($stmt); echo $conn." dropped table\n\n"; } function insert_data($conn) -{ - $stmt = ociparse($conn,"insert into scott.hallo values('$conn' || - ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); - ociexecute ($stmt,OCI_DEFAULT); +{ $stmt = ociparse($conn,"insert into scott.hallo + values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); + ociexecute($stmt,OCI_DEFAULT); echo $conn." inserted hallo\n\n"; } function delete_data($conn) -{ - $stmt = ociparse ($conn,"delete from scott.hallo"); - ociexecute ($stmt,OCI_DEFAULT); +{ $stmt = ociparse($conn,"delete from scott.hallo"); + ociexecute($stmt,OCI_DEFAULT); echo $conn." deleted hallo\n\n"; } function commit($conn) -{ - ocicommit($conn); - echo $conn." commited\n\n"; +{ ocicommit($conn); + echo $conn." committed\n\n"; } function rollback($conn) -{ - ocirollback($conn); +{ ocirollback($conn); echo $conn." rollback\n\n"; } function select_data($conn) -{ - $stmt = ociparse ($conn, "select * from scott.hallo"); - ociexecute ($stmt, OCI_DEFAULT); +{ $stmt = ociparse($conn,"select * from scott.hallo"); + ociexecute($stmt,OCI_DEFAULT); echo $conn."----selecting\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; echo $conn."----done\n\n"; } -create_table ($c1); -insert_data ($c1); +create_table($c1); +insert_data($c1); -select_data ($c1); -select_data ($c2); +select_data($c1); +select_data($c2); -rollback ($c1); +rollback($c1); -select_data ($c1); -select_data ($c2); +select_data($c1); +select_data($c2); -insert_data ($c2); -commit ($c2); +insert_data($c2); +commit($c2); -select_data ($c1); +select_data($c1); -delete_data ($c1); -select_data ($c1); -select_data ($c2); -commit ($c1); +delete_data($c1); +select_data($c1); +select_data($c2); +commit($c1); -select_data ($c1); -select_data ($c2); +select_data($c1); +select_data($c2); -drop_table ($c1); -print "</PRE></HTML>"; +drop_table($c1); +print "</PRE></HTML>"; ?> +]]> </programlisting> </example> </para> @@ -782,8 +763,9 @@ </para> <example> <title>OCINewDescriptor</title> - <programlisting role="php"> -<?php + <programlisting> +<![CDATA[ +<?php /* ãã®ã¹ã¯ãªãã㯠HTML ãã©ã¼ã ããã³ã¼ã«ãããåæã§ä½æ * ããã¦ããã$user, $passwor, $table, $where, $commitsize * ããã©ã¼ã ããæ¸¡ããããã¨ãåæã«ãã¦ãã¾ãã @@ -794,7 +776,7 @@ $conn = OCILogon($user, $password); $stmt = OCIParse($conn,"select rowid from $table $where"); $rowid = OCINewDescriptor($conn,OCI_D_ROWID); - OCIDefineByName($stmt,"ROWID",&$rowid); + OCIDefineByName($stmt,"ROWID",$rowid); OCIExecute($stmt); while ( OCIFetch($stmt) ) { $nrows = OCIRowCount($stmt); @@ -810,29 +792,32 @@ print "$nrows deleted...\n"; OCIFreeStatement($stmt); OCILogoff($conn); -?> +?> +]]> </programlisting> <programlisting> -<?php +<![CDATA[ +<?php /* ãã®ã¹ã¯ãªãããLOB ã«ã©ã ã«ãã¡ã¤ã«ãã¢ãããã¼ãããä¾ã示ãã¾ãã * LOBã«ã©ã ã«ã¢ãããã¼ããè¡ããã®ä¾ã«é¢ãããã©ã¼ã ã¯ã - * <input type="file" name="lob_upload"> + * <form action="upload.php3" method="post" enctype="multipart/form-data"> + * <input type="file" name="lob_upload"> * ... ã®ãããªãã®ã使ç¨ããã¾ãã */ if(!isset($lob_upload) || $lob_upload == 'none'){ ?> -<form action="upload.php3" method="post" enctype="multipart/form-data"> -Upload file: <input type="file" name="lob_upload"><br> -<input type="submit" value="Upload"> - <input type="reset"> -</form> -<?php +<form action="upload.php3" method="post" enctype="multipart/form-data"> +Upload file: <input type="file" name="lob_upload"><br> +<input type="submit" value="Upload"> - <input type="reset"> +</form> +<?php } else { // $lob_upload ã¯ã¢ãããã¼ããã¡ã¤ã«ã®ãã³ãã©ãªãã¡ã¤ã«åãæãã¦ãã¾ã $conn = OCILogon($user, $password); $lob = OCINewDescriptor($conn, OCI_D_LOB); $stmt = OCIParse($conn,"insert into $table (id, the_blob) values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); - OCIBindByName($stmt, ':the_blob', &$lob, -1, OCI_B_BLOB); + OCIBindByName($stmt, ':the_blob', $lob, -1, OCI_B_BLOB); OCIExecute($stmt); if($lob->savefile($lob_upload)){ OCICommit($conn); @@ -845,6 +830,39 @@ OCILogoff($conn); } ?> +]]> + </programlisting> + </example> + <example> + <title>OCINewDescriptor</title> + <programlisting> +<![CDATA[ +<?php + /* Calling PL/SQL stored procedures which contain clobs as input + * parameters (PHP 4 >= 4.0.6). + * Example PL/SQL stored procedure signature is: + * + * PROCEDURE save_data + * Argument Name Type In/Out Default? + * ------------------------------ ----------------------- ------ -------- + * KEY NUMBER(38) IN + * DATA CLOB IN + * + */ + + $conn = OCILogon($user, $password); + $stmt = OCIParse($conn, "begin save_data(:key, :data); end;"); + $clob = OCINewDescriptor($conn, OCI_D_LOB); + OCIBindByName($stmt, ':key', $key); + OCIBindByName($stmt, ':data', $clob, -1, OCI_B_CLOB); + $clob->WriteTemporary($data); + OCIExecute($stmt, OCI_DEFAULT); + OCICommit($conn); + $clob->close(); + $clob->free(); + OCIFreeStatement($stmt); +?> +]]> </programlisting> </example> </refsect1> @@ -870,25 +888,27 @@ <para> <example> <title>OCIRowCount</title> - <programlisting role="php"> -<?php - print "<HTML><PRE>"; + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>"; $conn = OCILogon("scott","tiger"); $stmt = OCIParse($conn,"create table emp2 as select * from emp"); OCIExecute($stmt); - print OCIRowCount($stmt) . " rows inserted.<BR>"; + print OCIRowCount($stmt) . " rows inserted.<BR>"; OCIFreeStatement($stmt); $stmt = OCIParse($conn,"delete from emp2"); OCIExecute($stmt); - print OCIRowCount($stmt) . " rows deleted.<BR>"; + print OCIRowCount($stmt) . " rows deleted.<BR>"; OCICommit($conn); OCIFreeStatement($stmt); $stmt = OCIParse($conn,"drop table emp2"); OCIExecute($stmt); OCIFreeStatement($stmt); OCILogOff($conn); - print "</PRE></HTML>"; -?> + print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> @@ -914,27 +934,29 @@ </para> <example> <title>OCINumCols</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>\n"; -$conn = OCILogon ("scott", "tiger"); -$stmt = OCIParse ($conn,"select * from emp"); -OCIExecute ($stmt); -while (OCIFetch ($stmt)) { - print "\n"; - $ncols = OCINumCols ($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName ($stmt, $i); - $column_value = OCIResult ($stmt, $i); - print $column_name . ': ' . $column_value . "\n"; - } - print "\n"; -} -OCIFreeStatement ($stmt); -OCILogoff ($conn); -print "</PRE>"; -print "</HTML>\n"; + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + while ( OCIFetch($stmt) ) { + print "\n"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_value = OCIResult($stmt,$i); + print $column_name . ': ' . $column_value . "\n"; + } + print "\n"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; ?> +]]> </programlisting> </example> </refsect1> @@ -1018,15 +1040,21 @@ æå®å¯è½ãªãã©ã°ã次ã«ç¤ºãã¾ãã <simplelist> - <member><literal>OCI_ASSOC</literal> 飿³é åãè¿ãã</member> - <member><literal>OCI_NUM</literal> æ·»å 1 ããå§ã¾ãé åãè¿ãã(ããã©ã«ã)</member> - <member><literal>OCI_RETURN_NULLS</literal> 空ã®ã«ã©ã ãè¿ãã</member> - <member><literal>OCI_RETURN_LOBS</literal> ãã£ã¹ã¯ãªãã¿ã®ä»£ããã« LOB ã®å¤ãè¿ãã</member> + <member> + <literal>OCI_ASSOC</literal> 飿³é åãè¿ãã + </member> + <member> + <literal>OCI_NUM</literal> æ·»å 1 ããå§ã¾ãé åãè¿ãã(ããã©ã«ã) + </member> + <member> + <literal>OCI_RETURN_NULLS</literal> 空ã®ã«ã©ã ãè¿ãã + </member> + <member> + <literal>OCI_RETURN_LOBS</literal> ãã£ã¹ã¯ãªãã¿ã®ä»£ããã« LOB + ã®å¤ãè¿ãã + </member> </simplelist> - - </para> - <para> - </para> + </para> </refsect1> </refentry> @@ -1051,44 +1079,45 @@ </para> <example> <title>OCIFetchStatement</title> - <programlisting role="php"> -<?php + <programlisting> +<![CDATA[ +<?php /* OCIFetchStatement example mbritton@verinet.com (990624) */ -$conn = OCILogon ("scott", "tiger"); +$conn = OCILogon("scott","tiger"); -$stmt = OCIParse ($conn, "select * from emp"); +$stmt = OCIParse($conn,"select * from emp"); -OCIExecute ($stmt); +OCIExecute($stmt); -$nrows = OCIFetchStatement ($stmt,$results); -if ($nrows > 0) { - print "<TABLE BORDER=\"1\">\n"; - print "<TR>\n"; +$nrows = OCIFetchStatement($stmt,$results); +if ( $nrows > 0 ) { + print "<TABLE BORDER=\"1\">\n"; + print "<TR>\n"; while ( list( $key, $val ) = each( $results ) ) { - print "<TH>$key</TH>\n"; + print "<TH>$key</TH>\n"; } - print "</TR>\n"; + print "</TR>\n"; - for ( $i = 0; $i < $nrows; $i++ ) { - reset ($results); - print "<TR>\n"; - while ( $column = each ($results) ) { + for ( $i = 0; $i < $nrows; $i++ ) { + reset($results); + print "<TR>\n"; + while ( $column = each($results) ) { $data = $column['value']; - print "<TD>$data[$i]</TD>\n"; + print "<TD>$data[$i]</TD>\n"; } - print "</TR>\n"; + print "</TR>\n"; } - print "</TABLE>\n"; + print "</TABLE>\n"; } else { - echo "No data found<BR>\n"; + echo "No data found<BR>\n"; } -print "$nrows Records Selected<BR>\n"; +print "$nrows Records Selected<BR>\n"; -OCIFreeStatement ($stmt); -OCILogoff ($conn); - +OCIFreeStatement($stmt); +OCILogoff($conn); ?> +]]> </programlisting> </example> </refsect1> @@ -1118,6 +1147,67 @@ </refsect1> </refentry> + <refentry id="function.ocicolumnname"> + <refnamediv> + <refname>OCIColumnName</refname> + <refpurpose>ã«ã©ã ã®ååãè¿ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>OCIColumnName</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnName</function> ã¯æå®ãã(1ããå§ã¾ã)ã«ã©ã + çªå·ã«å¯¾å¿ããã«ã©ã ã®ååãè¿ãã¾ãã + </simpara> + <para> + <example> + <title>OCIColumnName</title> + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> + </programlisting> + </example> + </para> + <simpara> + <function>OCINumCols</function>, <function>OCIColumnType</function>, + <function>OCIColumnSize</function>ãåç §ä¸ããã + </simpara> + </refsect1> + </refentry> + <refentry id="function.ocicolumnsize"> <refnamediv> <refname>OCIColumnSize</refname> @@ -1133,42 +1223,44 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIColumnSize</function>ã¯Oracleã«ããæå®ãããã«ã©ã ã®ãµã¤ãºã - è¿ãã¾ãã - <parameter>col</parameter>ãã©ã¡ã¼ã¿ã«(1ããå§ã¾ã)ã«ã©ã çªå·ã¾ã㯠- ã«ã©ã åã®ã©ã¡ããã使ç¨å¯è½ã§ãã + <function>OCIColumnSize</function>ã¯Oracleã«ããæå®ãããã«ã©ã + ã®ãµã¤ãºãè¿ãã¾ãã<parameter>col</parameter>ãã©ã¡ã¼ã¿ã«(1ãã + å§ã¾ã)ã«ã©ã çªå·ã¾ãã¯ã«ã©ã åã®ã©ã¡ããã使ç¨å¯è½ã§ãã </para> <para> <example> <title>OCIColumnSize</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>\n"; -$conn = OCILogon ("scott", "tiger"); -$stmt = OCIParse ($conn, "select * from emp"); -OCIExecute ($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>Name</TH>"; -print "<TH>Type</TH>"; -print "<TH>Length</TH>"; -print "</TR>"; -$ncols = OCINumCols ($stmt); -for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName ($stmt, $i); - $column_type = OCIColumnType ($stmt, $i); - $column_size = OCIColumnSize ($stmt, $i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; -} -OCIFreeStatement ($stmt); -OCILogoff ($conn); -print "</PRE>"; -print "</HTML>\n"; + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + print "</TABLE>"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; ?> +]]> </programlisting> </example> </para> @@ -1179,6 +1271,67 @@ </refsect1> </refentry> + <refentry id="function.ocicolumntype"> + <refnamediv> + <refname>OCIColumnType</refname> + <refpurpose>ã«ã©ã ã®ãã¼ã¿åãè¿ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>OCIColumnType</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnType</function>ã¯ãæå®ãã(1ããå§ã¾ã)ã«ã©ã + çªå·ã«å¯¾å¿ããã«ã©ã ã®ãã¼ã¿åãè¿ãã¾ãã + </simpara> + <para> + <example> + <title>OCIColumnType</title> + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> + </programlisting> + </example> + </para> + <simpara> + <function>OCINumCols</function>, <function>OCIColumnName</function>, + <function>OCIColumnSize</function> ãåç §ä¸ããã + </simpara> + </refsect1> + </refentry> + <refentry id="function.ociserverversion"> <refnamediv> <refname>OCIServerVersion</refname> @@ -1195,12 +1348,14 @@ <para> <example> <title>OCIServerVersion</title> - <programlisting role="php"> -<?php -$conn = OCILogon ("scott", "tiger"); -print "Server Version: " . OCIServerVersion($conn); -OCILogOff ($conn); + <programlisting> +<![CDATA[ +<?php + $conn = OCILogon("scott","tiger"); + print "Server Version: " . OCIServerVersion($conn); + OCILogOff($conn); ?> +]]> </programlisting> </example> </para> @@ -1279,19 +1434,21 @@ <example> <title>ã³ã¼ãã£ã³ã°ä¾</title> <programlisting role="php"> -<?php -print "<HTML><PRE>"; -$conn = OCILogon ("scott", "tiger"); -$sql = "delete from emp where deptno = 10"; +<![CDATA[ +<?php + print "<HTML><PRE>"; + $conn = OCILogon("scott","tiger"); + $sql = "delete from emp where deptno = 10"; -$stmt = OCIParse ($conn,$sql); -if (OCIStatementType ($stmt) == "DELETE" ) { - die "You are not allowed to delete from this table<BR>"; -} + $stmt = OCIParse($conn,$sql); + if ( OCIStatementType($stmt) == "DELETE" ) { + die "You are not allowed to delete from this table<BR>"; + } -OCILogoff ($conn); -print "</PRE></HTML>"; + OCILogoff($conn); + print "</PRE></HTML>"; ?> +]]> </programlisting> </example> </para> @@ -1321,66 +1478,70 @@ <para> <example> <title>ã¹ãã¢ãããã·ã¼ã¸ã£ããã®åç §ã«ã¼ã½ã«ã®ä½¿ç¨ä¾</title> - <programlisting role="php"> -<?php + <programlisting> +<![CDATA[ +<?php // ã¹ãã¢ãããã·ã¼ã¸ã£ info.output ã :data ã®åç §ã«ã¼ã½ã«ãè¿ãã¨ä»®å®ãã -$conn = OCILogon ("scott", "tiger"); -$curs = OCINewCursor ($conn); -$stmt = OCIParse ($conn, "begin info.output(:data); end;"); +$conn = OCILogon("scott","tiger"); +$curs = OCINewCursor($conn); +$stmt = OCIParse($conn, "begin info.output(:data); end;"); -ocibindbyname ($stmt,"data",&$curs,-1,OCI_B_CURSOR); -ociexecute ($stmt); -ociexecute ($curs); +ocibindbyname($stmt,"data",$curs,-1,OCI_B_CURSOR); +ociexecute($stmt); +ociexecute($curs); -while (OCIFetchInto($curs,&$data)) { +while (OCIFetchInto($curs,$data)) { var_dump($data); } -OCIFreeStatement ($stmt); -OCIFreeCursor ($curs); -OCILogoff ($conn); - ?> +OCIFreeStatement($stmt); +OCIFreeCursor($curs); +OCILogoff($conn); +?> +]]> </programlisting> </example> </para> <para> <example> - <title>selectæã«ãããåç §ã«ã¼ã½ã«ã®ä½¿ç¨ä¾</title> - <programlisting role="php"> -<?php -print "<HTML><BODY>"; -$conn = OCILogon ("scott","tiger"); + <title>selectæã«ãããREF CURSORã®ä½¿ç¨ä¾</title> + <programlisting> +<![CDATA[ +<?php +print "<HTML><BODY>"; +$conn = OCILogon("scott","tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . "where emp.deptno = dept.deptno) as EMPCNT from dept"; -$stmt = OCIParse ($conn,"select deptno,dname,$count_cursor"); - -ociexecute ($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>DEPT NAME</TH>"; -print "<TH>DEPT #</TH>"; -print "<TH># EMPLOYEES</TH>"; -print "</TR>"; +$stmt = OCIParse($conn,"select deptno,dname,$count_cursor"); -while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { - print "<TR>"; +ociexecute($stmt); +print "<TABLE BORDER=\"1\">"; +print "<TR>"; +print "<TH>DEPT NAME</TH>"; +print "<TH>DEPT #</TH>"; +print "<TH># EMPLOYEES</TH>"; +print "</TR>"; + +while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { + print "<TR>"; $dname = $data["DNAME"]; $deptno = $data["DEPTNO"]; - print "<TD>$dname</TD>"; - print "<TD>$deptno</TD>"; + print "<TD>$dname</TD>"; + print "<TD>$deptno</TD>"; ociexecute($data[ "EMPCNT" ]); - while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) { + while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) { $num_emps = $subdata["NUM_EMPS"]; - print "<TD>$num_emps</TD>"; + print "<TD>$num_emps</TD>"; } - print "</TR>"; + print "</TR>"; } -print "</TABLE>"; -print "</BODY></HTML>"; +print "</TABLE>"; +print "</BODY></HTML>"; OCIFreeStatement($stmt); OCILogoff($conn); ?> +]]> </programlisting> </example> </para> @@ -1447,124 +1608,6 @@ </refsect1> </refentry> - <refentry id="function.ocicolumnname"> - <refnamediv> - <refname>OCIColumnName</refname> - <refpurpose>ã«ã©ã ã®ååãè¿ã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>OCIColumnName</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnName</function> ã¯æå®ãã(1ããå§ã¾ã)ã«ã©ã - çªå·ã«å¯¾å¿ããã«ã©ã ã®ååãè¿ãã¾ãã - </simpara> - <para> - <example> - <title>OCIColumnName</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>\n"; -$conn = OCILogon ("scott", "tiger"); -$stmt = OCIParse ($conn,"select * from emp"); -OCIExecute ($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>Name</TH>"; -print "<TH>Type</TH>"; -print "<TH>Length</TH>"; -print "</TR>"; -$ncols = OCINumCols ($stmt); -for ($i = 1; $i <= $ncols; $i++) { - $column_name = OCIColumnName ($stmt, $i); - $column_type = OCIColumnType ($stmt, $i); - $column_size = OCIColumnSize ($stmt, $i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; -} -OCIFreeStatement ($stmt); -OCILogoff ($conn); -print "</PRE>"; -print "</HTML>\n"; -?> - </programlisting> - </example> - </para> - <simpara> - <function>OCINumCols</function>, <function>OCIColumnType</function>, - <function>OCIColumnSize</function>ãåç §ä¸ããã - </simpara> - </refsect1> - </refentry> - - <refentry id="function.ocicolumntype"> - <refnamediv> - <refname>OCIColumnType</refname> - <refpurpose>ã«ã©ã ã®ãã¼ã¿åãè¿ã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>OCIColumnType</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnType</function>ã¯ãæå®ãã(1ããå§ã¾ã)ã«ã©ã - çªå·ã«å¯¾å¿ããã«ã©ã ã®ãã¼ã¿åãè¿ãã¾ãã - </simpara> - <para> - <example> - <title>OCIColumnType</title> - <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn,"select * from emp"); - OCIExecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName($stmt,$i); - $column_type = OCIColumnType($stmt,$i); - $column_size = OCIColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> - </programlisting> - </example> - </para> - <simpara> - <function>OCINumCols</function>, <function>OCIColumnName</function>, - <function>OCIColumnSize</function> ãåç §ä¸ããã - </simpara> - </refsect1> - </refentry> - <refentry id="function.ociparse"> <refnamediv> <refname>OCIParse</refname> @@ -1878,6 +1921,26 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>OCICollAssign</function></funcdef> + <paramdef>object <parameter>collection</parameter></paramdef> + <paramdef>object <parameter>object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + Coming soon. + </simpara> + </refsect1> + </refentry> + + <refentry id="function.ocicollappend"> + <refnamediv> + <refname>OCICollAppend</refname> + <refpurpose>Coming soon.</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>OCICollAppend</function></funcdef> <paramdef>object <parameter>collection</parameter></paramdef> <paramdef>object <parameter>object</parameter></paramdef> </funcprototype> Index: phpdoc/ja/functions/openssl.xml diff -u phpdoc/ja/functions/openssl.xml:1.11 phpdoc/ja/functions/openssl.xml:1.12 --- phpdoc/ja/functions/openssl.xml:1.11 Wed Dec 12 15:53:26 2001 +++ phpdoc/ja/functions/openssl.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.12 $ --> <reference id="ref.openssl"> <title>OpenSSL 颿°</title> <titleabbrev>OpenSSL</titleabbrev> @@ -10,7 +11,7 @@ ãã®ã¢ã¸ã¥ã¼ã«ã¯ãç½²åã®çæããã³èªè¨¼ãããã¦ããã¼ã¿ã®ã·ã¼ã« (æå·å)ããã³ãªã¼ãã³(復å·å)ãè¡ãããã«ã <ulink url="&url.openssl;">OpenSSL</ulink> ã®é¢æ°ã使ç¨ãã¾ããã - ã®ã¢ã¸ã¥ã¼ã«ã§ã¯ãPHP 4.0.4pl1 ã¯ãOpenSSL >= 0.9.6 ãå¿ è¦ã¨ãã¾ + ã®ã¢ã¸ã¥ã¼ã«ã§ã¯ãPHP 4.0.4pl1 ã¯ãOpenSSL >= 0.9.6 ãå¿ è¦ã¨ãã¾ ãããPHP-4.0.5以éã§ã¯ãOpenSSL >= 0.9.5 ã§ãåä½ãã¾ãã </para> <note> @@ -232,9 +233,10 @@ <funcsynopsis> <funcprototype> <funcdef>mixed <function>openssl_error_string</function></funcdef> - <paramdef>void<parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> ã¨ã©ã¼ã¡ãã»ã¼ã¸æååãè¿ãã¾ããè¿ãã¹ãã¨ã©ã¼ã¡ãã»ã¼ã¸ããã ãªãå ´åã¯ã&false; ãè¿ãã¾ãã @@ -255,9 +257,11 @@ <example> <title><function>openssl_error_string</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // ããã§å¦çã«å¤±æããOpenSSL颿°ãã³ã¼ã«ããã¨ä»®å®ãã¾ã while($msg = openssl_error_string) - echo $msg . "<br>"; + echo $msg . "<br />"; +]]> </programlisting> </example> </para> @@ -282,6 +286,7 @@ <paramdef>resource <parameter>key_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_free_key</function> ã¯ãæå®ãã <parameter>key_identifier</parameter> ãæããã¼ãã¡ã¢ãªããéæ¾ @@ -308,6 +313,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«æ£ã®ãã¼ãªã½ã¼ã¹IDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãã </para> @@ -336,6 +342,7 @@ <paramdef>mixed <parameter>certificate</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«æ£ã®ãã¼ãªã½ã¼ã¹IDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãã </para> @@ -363,6 +370,7 @@ <paramdef>mixed <parameter>priv_key_id</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«&true;ãã¨ã©ã¼æã«&false;ãè¿ãã¾ããæåããå ´åããªã¼ãã³ã ãããã¼ã¿ã <parameter>open_data</parameter> ã«è¿ããã¾ãã @@ -380,6 +388,7 @@ <example> <title><function>openssl_open</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $sealed ããã³ $env_key ã«æå·åããããã¼ã¿ããã³ã¨ã³ããã¼ããã¼ // ãå«ã¾ãã¦ããã¨ä»®å®ãå ±ã«ã·ã¼ã«å (æå·åå´)ããä¸ããããã @@ -397,6 +406,7 @@ // å ¬éãã¼ãã¡ã¢ãªããéæ¾ openssl_free_key($pkeyid); +]]> </programlisting> </example> </para> @@ -422,6 +432,7 @@ <paramdef>array <parameter>pub_key_ids</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«ã·ã¼ã«(æå·å)ããããã¼ã¿ã®é·ããã¨ã©ã¼æã«&false;ãè¿ãã¾ ããæåæã«ã¯ãæå·åããããã¼ã¿ã @@ -441,6 +452,7 @@ <example> <title><function>openssl_seal</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $data ã«ã¯ãæå·åããããã¼ã¿ãå«ã¾ãã¦ããã¨ä»®å® // åä¿¡è ã®å ¬éãã¼ãåå¾ãã使ç¨å¯è½ã«ãã @@ -448,6 +460,7 @@ $cert = fread($fp, 8192); fclose($fp); $pk1 = openssl_get_publickey($cert); + // 2çªç®ã®åä¿¡è ã«ã¤ãã¦ãåæ§ $fp = fopen("/src/openssl-0.9.6/demos/sign/cert.pem", "r"); $cert = fread($fp, 8192); @@ -462,6 +475,7 @@ // ãã¼ãã¡ã¢ãªããéæ¾ãã openssl_free_key($pk1); openssl_free_key($pk2); +]]> </programlisting> </example> </para> @@ -486,6 +500,7 @@ <paramdef>int <parameter>priv_key_id</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ããæåããå ´åãç½²åã <parameter>signature</parameter> ã«è¿ããã¾ãã @@ -501,6 +516,7 @@ <example> <title><function>openssl_sign</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $data ã«ç½²åãããã¼ã¿ãå«ã¾ãã¦ããã¨ä»®å® // ãã¡ã¤ã«ããå ¬éãã¼ãåå¾ãã使ç¨å¯è½ã¨ãã @@ -514,6 +530,7 @@ // ã¡ã¢ãªãããã¼ãéæ¾ãã openssl_free_key($pkeyid); +]]> </programlisting> </example> </para> @@ -538,6 +555,7 @@ <paramdef>mixed <parameter>pub_key_id</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> ç½²å(signature)ãæ£ããå ´åã« 1ãæ£ãããªãå ´åã« 0ãã¨ã©ã¼ã®å ´å ã« -1 ãè¿ãã¾ãã @@ -554,6 +572,7 @@ <example> <title><function>openssl_verify</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $data ããã³ $signature ã¯ãã¼ã¿ããã³ç½²åãå«ã¾ãã¦ããã¨ä»®å® // èªè¨¼å±ããå ¬éãã¼ãåå¾ãã使ç¨å¯è½ã«ãã @@ -573,6 +592,7 @@ // ã¡ã¢ãªãããã¼ãéæ¾ openssl_free_key($pubkeyid); +]]> </programlisting> </example> </para> @@ -598,6 +618,7 @@ <paramdef>mixed <parameter>recipkey</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <parameter>infilename</parameter>ã§æå®ãããã¡ã¤ã«ä¸ã®S/MIMEæå· åãããã¡ãã»ã¼ã¸ãã<parameter>recipcert</parameter> ããã³ @@ -618,6 +639,7 @@ <example> <title><function>openssl_pkcs7_decrypt</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $cert ããã³ $key ã«ã¯ããªãã®åäººè¨¼ææ¸ã¨å ¬éãã¼ãå«ã¾ãã¦ããã // ããªãã¯S/MIMEã¡ãã»ã¼ã¸ã®åä¿¡è ã§ããã¨ä»®å®ãã¾ãã $infilename = "encrypted.msg"; // æå·åãããã¡ãã»ã¼ã¸ãå«ããã¡ã¤ã« @@ -627,7 +649,7 @@ echo "復å·åããã¾ãã!"; else echo "復å·åã«å¤±æãã¾ãã!"; - +]]> </programlisting> </example> </para> @@ -658,6 +680,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_pkcs7_encrypt</function> ã¯ã <parameter>infilename</parameter> ã¨ããååã®ãã¡ã¤ã«ã®å 容ã @@ -674,19 +697,14 @@ ã¦ãã¾ãã </para> <para> - <emphasis> - ãã®é¢æ°ã®ãã©ã¡ã¼ã¿/è¿ãå¤ã¯ãPHPã®ãªãªã¼ã¹çãå ¬éãããã¾ã§ã« - 夿´ãããå¯è½æ§ãããã¾ãã - </emphasis> - </para> - <para> <example> <title><function>openssl_pkcs7_encrypt</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // æå·åããã¡ãã»ã¼ã¸ã nighthawk ã¨ããååã®å¤é¨ã®ç§å¯ã®ã¨ã¼ // ã¸ã§ã³ãã«éä¿¡ãã¾ããéä¿¡å ã®è¨¼ææ¸ããã¡ã¤ã« nighthawk.pem ã«æã // ã¦ãã¾ãã -$data = <<<EOD +$data = <<<EOD Nighthawk, Top secret, for your eyes only! @@ -702,13 +720,14 @@ fclose($fp); // ã¡ãã»ã¼ã¸ãæå·å if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", "nighthawk.pem", - array("To" => "nighthawk@agent.com", // 飿³é åã®æ§æ - "From: HQ <hq@cia.com>", // æ·»åé åã®æ§æ - "Subject" => "Eyes only"))) + array("To" => "nighthawk@agent.com", // 飿³é åã®æ§æ + "From: HQ <hq@cia.com>", // æ·»åé åã®æ§æ + "Subject" => "Eyes only"))) { // ã¡ãã»ã¼ã¸ãæå·åããéä¿¡ãã¾ã! - exec(ini_get("sendmail_path") . " < enc.txt"); + exec(ini_get("sendmail_path") . " < enc.txt"); } +]]> </programlisting> </example> </para> @@ -742,6 +761,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_pkcs7_sign</function>ã¯ã <parameter>infilename</parameter> ã¨ããååã®ãã¡ã¤ã«ã®å 容ã«ã¤ @@ -769,18 +789,12 @@ ãå¯è½ã§ãã </para> <para> - <emphasis> - ãã®é¢æ°ã®ãã©ã¡ã¼ã¿/è¿ãå¤ã®åã¯ãPHPã®ãªãªã¼ã¹çãå ¬éãããå - ã«å¤æ´ãããå¯è½æ§ãããã¾ãã - </emphasis> - </para> - - <para> <example> <title><function>openssl_pkcs7_sign</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // åä¿¡è ãéä¿¡è ã確èªã§ããããã«ãµã¤ã³ãããã¡ãã»ã¼ã¸ -$data = <<<EOD +$data = <<<EOD You have my authorization to spend $10,000 on dinner expenses. @@ -794,13 +808,14 @@ // æå·å if (openssl_pkcs7_sign("msg.txt", "signed.txt", "mycert.pem", array("mycert.pem", "mypassphrase"), - array("To" => "joes@sales.com", // keyed syntax - "From: HQ <ceo@sales.com>", // indexed syntax - "Subject" => "Eyes only")) + array("To" => "joes@sales.com", // keyed syntax + "From: HQ <ceo@sales.com>", // indexed syntax + "Subject" => "Eyes only")) { // ã¡ãã»ã¼ã¸ã¯ãµã¤ã³ããã¾ãããéä¿¡ãã¾ããã! - exec(ini_get("sendmail_path") . " < signed.txt"); + exec(ini_get("sendmail_path") . " < signed.txt"); } +]]> </programlisting> </example> </para> @@ -835,6 +850,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_pkcs7_verify</function> ã¯ã <parameter>filename</parameter> ã§æå®ãããã¡ã¤ã«ã«è¨è¿°ããã @@ -899,6 +915,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> è¨¼ææ¸ãæå³ããç®çã«ä½¿ç¨å¯è½ã§ããå ´åã« &true;ã使ç¨ã§ããªãå ´å ã« &false; ãã¨ã©ã¼ã®å ´åã« -1 ãè¿ãã¾ãã @@ -1007,6 +1024,7 @@ <paramdef>resource <parameter>x509cert</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_x509_free</function> ã¯ãã¡ã¢ãªããæå®ãã <parameter>x509cert</parameter> ãªã½ã¼ã¹ã«é¢é£ããè¨¼ææ¸ãéæ¾ã @@ -1037,6 +1055,7 @@ <parameter><optional>shortnames</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_x509_parse</function> ã¯ãæå®ãã <parameter>x509cert</parameter> ã«é¢ããæ å ±ãè¿ãã¾ãããã®æ å ± @@ -1076,6 +1095,7 @@ <paramdef>mixed <parameter>x509certdata</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_x509_read</function> ã¯ã <parameter>x509certdata</parameter> ã§æå®ããè¨¼ææ¸ããã¼ã¹ãã @@ -1088,6 +1108,354 @@ </note> </refsect1> </refentry> + + <refentry id="function.openssl-x509-export-to-file"> + <refnamediv> + <refname>openssl_x509_export_to_file</refname> + <refpurpose>CERTããã¡ã¤ã«ã¾ãã¯å¤æ°ã«ã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_x509_export_to_file</function></funcdef> + <paramdef>mixed <parameter>x509</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-x509-export"> + <refnamediv> + <refname>openssl_x509_export</refname> + <refpurpose>CERTããã¡ã¤ã«ã¾ãã¯å¤æ°ãã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_x509_export</function></funcdef> + <paramdef>mixed <parameter>x509</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-x509-check-private-key"> + <refnamediv> + <refname>openssl_x509_check_private_key</refname> + <refpurpose>ç§å¯ãã¼ãããCERTã«å¯¾å¿ãããã確èªãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_x509_check_private_key</function></funcdef> + <paramdef>mixed <parameter>cert</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-export-to-file"> + <refnamediv> + <refname>openssl_csr_export_to_file</refname> + <refpurpose>CSRããã¡ã¤ã«ã¾ãã¯å¤æ°ã«ã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_csr_export_to_file</function></funcdef> + <paramdef>resource <parameter>csr</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-export"> + <refnamediv> + <refname>openssl_csr_export</refname> + <refpurpose>CSRããã¡ã¤ã«ã¾ãã¯å¤æ°ã«ã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_csr_export</function></funcdef> + <paramdef>resource <parameter>csr</parameter></paramdef> + <paramdef>string <parameter>out</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-sign"> + <refnamediv> + <refname>openssl_csr_sign</refname> + <refpurpose>ä»ã®CERTã§è¨¼ææ¸ããµã¤ã³ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>resource <function>openssl_csr_sign</function></funcdef> + <paramdef>mixed <parameter>csr</parameter></paramdef> + <paramdef>mixed <parameter>x509</parameter></paramdef> + <paramdef>mixed <parameter>priv_key</parameter></paramdef> + <paramdef>long <parameter>days</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-new"> + <refnamediv> + <refname>openssl_csr_new</refname> + <refpurpose>ç§å¯ãã¼ã¨CSRãçæãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_csr_new</function></funcdef> + <paramdef>array <parameter>dn</parameter></paramdef> + <paramdef>resource <parameter>privkey</parameter></paramdef> + <paramdef>array + <parameter><optional>extraattribs</optional></parameter> + </paramdef> + <paramdef>array + <parameter><optional>configargs</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-pkey-new"> + <refnamediv> + <refname>openssl_pkey_new</refname> + <refpurpose>æ°è¦ã«ç§å¯ãã¼ãçæãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>resource <function>openssl_pkey_new</function></funcdef> + <paramdef>array + <parameter><optional>configargs</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-pkey-export-to-file"> + <refnamediv> + <refname>openssl_pkey_export_to_file</refname> + <refpurpose> + ãã¼ã®ã¨ãã¹ãã¼ãå¯è½ãªè¡¨ç¾ããã¡ã¤ã«ã«åå¾ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_pkey_export_to_file</function></funcdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>string + <parameter><optional>passphrase</optional></parameter> + </paramdef> + <paramdef>array + <parameter><optional>config_args</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-pkey-export"> + <refnamediv> + <refname>openssl_pkey_export</refname> + <refpurpose> + ãããã¼ã®ã¨ã¯ã¹ãã¼ãå¯è½ãªè¡¨ç¾ãæååã¾ãã¯ãã¡ã¤ã«ã«åå¾ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_pkey_export</function></funcdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>mixed <parameter>out</parameter></paramdef> + <paramdef>string + <parameter><optional>passphrase</optional></parameter> + </paramdef> + <paramdef>array + <parameter><optional>config_args</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-private-encrypt"> + <refnamediv> + <refname>openssl_private_encrypt</refname> + <refpurpose>ç§å¯ãã¼ã§ãã¼ã¿ãæå·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_private_encrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-private-decrypt"> + <refnamediv> + <refname>openssl_private_decrypt</refname> + <refpurpose>ç§å¯ãã¼ã§ãã¼ã¿ã復å·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_private_decrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-public-encrypt"> + <refnamediv> + <refname>openssl_public_encrypt</refname> + <refpurpose>å ¬éãã¼ã§ãã¼ã¿ãæå·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_public_encrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-public-decrypt"> + <refnamediv> + <refname>openssl_public_decrypt</refname> + <refpurpose>å ¬éãã¼ã§ãã¼ã¿ã復å·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_public_decrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>resource <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + </reference> <!-- Keep this comment at the end of the file Index: phpdoc/ja/functions/oracle.xml diff -u phpdoc/ja/functions/oracle.xml:1.9 phpdoc/ja/functions/oracle.xml:1.10 --- phpdoc/ja/functions/oracle.xml:1.9 Wed Dec 12 15:53:27 2001 +++ phpdoc/ja/functions/oracle.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.oracle"> <title>Oracle 颿°</title> <titleabbrev>Oracle</titleabbrev> @@ -46,15 +47,17 @@ åºåå¤ãä»£å ¥ããã¾ãã <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php ora_parse($curs, "declare tmp INTEGER; begin tmp := :in; :out := tmp; :x := 7.77; end;"); ora_bind($curs, "result", ":x", $len, 2); ora_bind($curs, "input", ":in", 5, 1); ora_bind($curs, "output", ":out", 5, 2); $input = 765; ora_exec($curs); -echo "Result: $result<BR>Out: $output<BR>In: $input"; +echo "Result: $result<BR>Out: $output<BR>In: $input"; ?> +]]> </programlisting> </informalexample> </para> @@ -302,7 +305,8 @@ UNIXçã®Oracleä¸ã§ã¯ã以ä¸ã®ããã«ã¨ã©ã¼ã¡ãã»ã¼ã¸ã«é¢ãã詳細ãå¾ãã㨠ãã§ãã¾ãã <computeroutput> - <prompt>$</prompt> <userinput>oerr ora <replaceable>00001</replaceable></userinput> 00001, 00000, +<prompt>$</prompt> <userinput>oerr ora +<replaceable>00001</replaceable></userinput> 00001, 00000, "unique constraint (%s.%s) violated" // *Cause: An update or insert statement attempted to insert a duplicate key // For Trusted ORACLE configured in DBMS MAC mode, you may see // this message @@ -415,12 +419,14 @@ <example> <title>Oracleã¬ã³ã¼ããé åã«åå¾ãã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php array($results); -ora_fetch_into($cursor, &$results); +ora_fetch_into($cursor, &$results); echo $results[0]; echo $results[1]; ?> +]]> </programlisting> </example> é åããªãã¡ã¬ã³ã¹ã§åå¾ããå¿ è¦ããããã¨ã«æ³¨æãã¦ä¸ããã @@ -511,7 +517,9 @@ <productname>SQL*Net</productname> ãç¨ãã¦ä½æããã¾ãã <informalexample> <programlisting role="php"> +<![CDATA[ $conn = Ora_Logon("user<emphasis>@TNSNAME</emphasis>", "pass"); +]]> </programlisting> </informalexample> </para> @@ -643,7 +651,7 @@ é¢é£ä»ãã¾ãã </para> <para> - æåæã«0ãã¨ã©ã¼ã®å ´åã¯-1ãè¿ãã¾ãã + &return.success; </para> <simpara> <function>ora_exec</function>, <function>ora_fetch</function>, Index: phpdoc/ja/functions/outcontrol.xml diff -u phpdoc/ja/functions/outcontrol.xml:1.11 phpdoc/ja/functions/outcontrol.xml:1.12 --- phpdoc/ja/functions/outcontrol.xml:1.11 Wed Dec 12 15:53:28 2001 +++ phpdoc/ja/functions/outcontrol.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.12 $ --> <reference id="ref.outcontrol"> <title>åºåå¶å¾¡é¢æ°</title> <titleabbrev>åºåå¶å¾¡</titleabbrev> @@ -17,7 +18,8 @@ <example> <title><function>åºå颿°</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php ob_start(); echo "Hello\n"; @@ -26,7 +28,8 @@ ob_end_flush(); -?> +?> +]]> </programlisting> </example> </para> @@ -78,6 +81,12 @@ ãã¡ãªã³ã°ãããæãå¤å´ã®ãã¼ãã«ã® </table> ã¿ã°ãç¾ãã ã¾ã§ãã¼ãã«ã¯æç»ããã¾ããã </para> + <para> + ããã¤ãã®ãã¼ã¸ã§ã³ã®Microsoft Internet Explorerã¯ã256ãã¤ãã® + åºåãåãã¦ãããã¼ã¸ã表示ãå§ãã¾ãããã®ããããããã®ãã©ã¦ + ã¶ã«ãã¼ã¸ã表示ãããã«ã¯ããã©ãã·ã¥ããåã«ä½åãªç©ºç½ãéä¿¡ã + ãå¿ è¦ãããããããã¾ããã + </para> </note> </refsect1> </refentry> @@ -142,7 +151,8 @@ <example> <title>ã¦ã¼ã¶å®ç¾©ã®ã³ã¼ã«ããã¯é¢æ°ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php function callback($buffer) { @@ -153,30 +163,33 @@ ob_start("callback"); -?> +?> -<html> -<body> -<p>It's like comparing apples to oranges. -</body> -</html> +<html> +<body> +<p>It's like comparing apples to oranges. +</body> +</html> -<?php +<?php ob_end_flush(); -?> +?> +]]> </programlisting> </example> <para> åºåã¯æ¬¡ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -<html> -<body> -<p>It's like comparing oranges to oranges. -</body> -</html> +<![CDATA[ +<html> +<body> +<p>It's like comparing oranges to oranges. +</body> +</html> +]]> </programlisting> </informalexample> </para> @@ -242,6 +255,31 @@ </refsect1> </refentry> + <refentry id="function.ob-get-level"> + <refnamediv> + <refname>ob_get_level</refname> + <refpurpose> + åºåãããã¡ãªã³ã°æ©æ§ã®ãã¹ãã¬ãã«ãè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ob_get_level</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + ãã®é¢æ°ã¯ãåºåãããã¡ãªã³ã°æ©æ§ã®ãã¹ãã¬ãã«ãè¿ãã¾ãã + </para> + <para> + <function>ob_start</function>ããã³ + <function>ob_get_contents</function>ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + <refentry id="function.ob-gzhandler"> <refnamediv> <refname>ob_gzhandler</refname> @@ -255,8 +293,16 @@ <funcprototype> <funcdef>string <function>ob_gzhandler</function></funcdef> <paramdef>string <parameter>buffer</parameter></paramdef> + <paramdef>int + <parameter><optional>mode</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> + <note> + <para> + <parameter>mode</parameter>ã¯ãPHP 4.0.5ã§è¿½å ããã¾ããã + </para> + </note> <para> <function>ob_gzhandler</function> ã¯ãWebãã¼ã¸ã®å§ç¸®ããµãã¼ãã ãgzã¨ã³ã³ã¼ãããããã¼ã¿ãWebãã©ã¦ã¶ã«éä¿¡ãããã¨ã容æã«ãã @@ -272,22 +318,89 @@ <example> <title><function>ob_gzhandler</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php ob_start("ob_gzhandler"); ?> -<html> -<body> -<p>This should be a compressed page. -</html> -</body> +<html> +<body> +<p>This should be a compressed page. +</html> +<body> +]]> </programlisting> </example> </para> <para> <function>ob_start</function> ããã³ <function>ob_end_flush</function>ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + + <refentry id="function.ob-flush"> + <refnamediv> + <refname>ob_flush</refname> + <refpurpose> + åºåãããã¡ããã©ãã·ã¥(éä¿¡)ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ob_flush</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + ãã®é¢æ°ã¯ã(ããå ´åã«)åºåãããã¡ã®å 容ãéä¿¡ãã¾ããæ´ã«ãã + ãã¡ã®å 容ãå¦çãããå ´åã«ã¯ã<function>ob_flush</function>ãã³ã¼ + ã«ãããå¾ã«ãããã¡ã®å 容ãç ´æ£ãããã®ã§ã + <function>ob_flush</function>ã®åã« + <function>ob_get_contents</function>ãã³ã¼ã«ããå¿ è¦ãããã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ã<function>ob_end_flush</function>ã®ããã«åºåãããã¡ + ãç ´æ£ãã¾ããã + </para> + <para> + <function>ob_get_contents</function>, + <function>ob_clean</function>, + <function>ob_end_flush</function>, + <function>ob_end_clean</function>ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + + <refentry id="function.ob-clean"> + <refnamediv> + <refname>ob_clean</refname> + <refpurpose> + åºåãããã¡ãã¯ãªã¢(æ¶å»)ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ob_clean</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + ãã®é¢æ°ã¯ãåºåãããã¡ã®å 容ãç ´æ£ãã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ã<function>ob_end_clean</function>ã®ããã«åºåãããã¡ + ãç ´æ£ãã¾ããã + </para> + <para> + <function>ob_flush</function>, + <function>ob_end_flush</function>, + <function>ob_end_clean</function>ãåç §ä¸ããã </para> </refsect1> </refentry> Index: phpdoc/ja/functions/pcntl.xml diff -u phpdoc/ja/functions/pcntl.xml:1.3 phpdoc/ja/functions/pcntl.xml:1.4 --- phpdoc/ja/functions/pcntl.xml:1.3 Wed Dec 12 15:53:29 2001 +++ phpdoc/ja/functions/pcntl.xml Sat Jan 26 10:38:34 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <reference id="ref.pcntl"> <title>ããã»ã¹å¶å¾¡é¢æ°</title> <titleabbrev>PCNTL</titleabbrev> @@ -113,7 +113,8 @@ <example> <title>ããã»ã¹å¶å¾¡ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $pid = pcntl_fork(); if ($pid == -1) { @@ -159,6 +160,7 @@ ?> +]]> </programlisting> </example> </sect1> @@ -192,7 +194,8 @@ <example> <title><function>pcntl_fork</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $pid = pcntl_fork(); if ($pid == -1) { @@ -203,7 +206,8 @@ // åããã»ã¹ã®å ´å } -?> +?> +]]> </programlisting> </example> <para> @@ -242,7 +246,8 @@ <example> <title><function>pcntl_signal</function> Example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // signal handler function function sig_handler($signo) { @@ -279,12 +284,13 @@ print "Done\n" -?> +?> +]]> </programlisting> </example> <para> - See also <function>pcntl_fork</function> and - <function>pcntl_waitpid</function>. + <function>pcntl_fork</function>ããã³ + <function>pcntl_waitpid</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -306,54 +312,52 @@ </funcprototype> </funcsynopsis> <para> - The <function>pcntl_waitpid</function> function suspends execution - of the current process until a child as specified by the - <parameter>pid</parameter> argument has exited, or until a signal - is delivered whose action is to terminate the current process or - to call a signal handling function. If a child as requested by - <parameter>pid</parameter> has already exited by the time of the - call (a so-called "zombie" process), the function returns - immediately. Any system resources used by the child are - freed. Please see your system's waitpid(2) man page for specific - details as to how waitpid works on your system. - </para> - <para> - <function>pcntl_waitpid</function> returns the process ID of the - child which exited, -1 on error or zero if WNOHANG was used and no - child was available + <function>pcntl_waitpid</function>颿°ã¯ã + 弿°<parameter>pid</parameter>ã§æå®ããåããã»ã¹ãçµäºãããã + ã«ã¬ã³ãã®ããã»ã¹ãçµäºãããã·ã°ãã«å¦ç颿°ãã³ã¼ã«ããã·ã°ã + ã«ãéä¿¡ãããã¾ã§ã«ã¬ã³ãã®ããã»ã¹ã®å®è¡ã䏿ãã¾ãã + <parameter>pid</parameter>ã§ãªã¯ã¨ã¹ããããåããã»ã¹ãã ã³ã¼ã« + æã«æ¢ã«çµäºãã¦ããå ´å("ã¾ã³ã"ããã»ã¹ã¨å¼ã°ãã¾ã)ããã®é¢æ° + ã¯ç´ã¡ã«å¦çãè¿ãã¾ããåããã»ã¹ã«ãã使ç¨ãããå ¨ã¦ã®ã·ã¹ãã + ãªã½ã¼ã¹ã¯ãè§£æ¾ããã¾ããwaitpidãã·ã¹ãã ã§ã®åä½ã«é¢ãã詳細㫠+ ã¤ãã¦ã¯ãã·ã¹ãã ã®waitpid(2)ããã¥ã¢ã«ãã¼ã¸ãåç §ä¸ããã + </para> + <para> + <function>pcntl_waitpid</function>ã¯ãçµäºããåããã»ã¹ã®ããã» + ã¹IDãè¿ãã¾ããã¨ã©ã¼ã®å ´åã¯-1ãWNOHANGã使ç¨ãããåããã»ã¹ã + å©ç¨ã§ããªãå ´åã«0ãè¿ãã¾ãã </para> <para> - The value of <parameter>pid</parameter> can be one of the following: + <parameter>pid</parameter>ã®å¤ã¯æ¬¡ã®ã©ããã¨ãªãã¾ãã <table> - <title>possible values for <parameter>pid</parameter></title> + <title><parameter>pid</parameter>ã®å¤</title> <tgroup cols="2"> <tbody> <row> <entry><literal>< -1</literal></entry> <entry> - wait for any child process whose process group ID is equal to - the absolute value of <parameter>pid</parameter>. + <parameter>pid</parameter>ã®çµ¶å¯¾å¤ã«çããããã»ã¹ã°ã«ã¼ãID + ãçããåããã»ã¹ãå¾ ã¡ã¾ãã </entry> </row> <row> <entry><literal>-1</literal></entry> <entry> - wait for any child process; this is the same behaviour that - the wait function exhibits. + å ¨ã¦ã®åããã»ã¹ãå¾ ã¤ãããã¯ãwait颿°ã®åä½ã¨åãã§ãã </entry> </row> <row> <entry><literal>0</literal></entry> <entry> - wait for any child process whose process group ID is equal to - that of the calling process. + ããã»ã¹ã°ã«ã¼ãIDãã³ã¼ã«å´ã®ããã»ã¹ã¨çããåããã»ã¹ãå¾ + ã¡ã¾ãã </entry> </row> <row> <entry><literal>> 0</literal></entry> <entry> - wait for the child whose process ID is equal to the value of - <parameter>pid</parameter>. + ããã»ã¹IDã<parameter>pid</parameter>ã®å¤ã«çããåããã»ã¹ + ãå¾ ã¡ã¾ãã </entry> </row> </tbody> @@ -361,9 +365,9 @@ </table> </para> <para> - <function>pcntl_waitpid</function> will store status information - in the <parameter>status</parameter> parameter which can be - evaluated using the following functions: + <function>pcntl_waitpid</function>ã¯ããã©ã¡ã¼ã¿ + <parameter>status</parameter>ã®ä¸ã«ã¹ãã¼ã¿ã¹æ å ±ãä¿åãã¾ããã + ã®ã¹ãã¼ã¿ã¹ã¯ã次ã®é¢æ°ãç¨ãã¦è©ä¾¡å¯è½ã§ãã <function>pcntl_wifexited</function>, <function>pcntl_wifstopped</function>, <function>pcntl_wifsignaled</function>, @@ -372,24 +376,23 @@ <function>pcntl_wstopsig</function>. </para> <para> - The value of <parameter>options</parameter> is the value of zero - or more of the following two global constants - <literal>OR</literal>'ed together: + <parameter>options</parameter>ã®å¤ã¯ã次ã®2ã¤ã®ã°ãã¼ãã«å®æ°ã®ã¼ + ãã¾ãã¯ãã以ä¸ã®è«çåã§ãã <table> - <title>possible values for <parameter>options</parameter></title> + <title><parameter>options</parameter>ã®å¤</title> <tgroup cols="2"> <tbody> <row> <entry><literal>WNOHANG</literal></entry> <entry> - return immediately if no child has exited. + åããã»ã¹ãçµäºãã¦ããªãå ´åã«ç´ã¡ã«å¦çãè¿ãã¾ãã </entry> </row> <row> <entry><literal>WUNTRACED</literal></entry> <entry> - return for children which are stopped, and whose status has - not been reported. + 忢ããåããã»ã¹ã®å ´åã«å¦çãè¿ãã¾ããããã¦ãã¹ãã¼ã¿ã¹ + ã¯ãªãã¼ãããã¾ããã </entry> </row> </tbody> @@ -397,14 +400,14 @@ </table> </para> <para> - See also <function>pcntl_fork</function>, + <function>pcntl_fork</function>, <function>pcntl_signal</function>, <function>pcntl_wifexited</function>, <function>pcntl_wifstopped</function>, <function>pcntl_wifsignaled</function>, <function>pcntl_wexitstatus</function>, - <function>pcntl_wtermsig</function> and - <function>pcntl_wstopsig</function>. + <function>pcntl_wtermsig</function>, + <function>pcntl_wstopsig</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -425,18 +428,18 @@ </funcprototype> </funcsynopsis> <para> - Returns the return code of a terminated child. This function is - only useful if <function>pcntl_wifexited</function> returned - &true;. + çµäºããåããã»ã¹ã®ãªã¿ã¼ã³ã³ã¼ããè¿ãã¾ãããã®é¢æ°ã¯ã + <function>pcntl_wifexited</function>ã&true;ãè¿ãå ´åã®ã¿æç¨ã§ + ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wifexited</function>. + <function>pcntl_waitpid</function>ããã³ + <function>pcntl_wifexited</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -457,17 +460,17 @@ </funcprototype> </funcsynopsis> <para> - Returns &true; if the child status code represents a successful - exit. + åããã»ã¹ã®ã¹ãã¼ã¿ã¹ã³ã¼ããçµäºã«æåããå ´åã«&true;ãè¿ãã¾ + ãã </para> - <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + <para> + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wexitstatus</function>. + <function>pcntl_waitpid</function>ããã³ + <function>pcntl_wexitstatus</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -488,17 +491,17 @@ </funcprototype> </funcsynopsis> <para> - Returns &true; if the child process exited because of a signal - which was not caught. + ææãããªãã£ãã·ã°ãã«ã®ããã§åããã»ã¹ãçµäºããå ´åã«&true; + ãè¿ãã¾ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_signal</function>. + <function>pcntl_waitpid</function>ããã³ + <function>pcntl_signal</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -519,23 +522,22 @@ </funcprototype> </funcsynopsis> <para> - Returns &true; if the child process which caused the return is - currently stopped; this is only possible if the call to - <function>pcntl_waitpid</function> was done using the option - <literal>WUNTRACED</literal>. + ãªã¿ã¼ã³ãçããåããã»ã¹ãç¾å¨åæ¢ãã¦ããå ´åã«&true;ãè¿ãã¾ + ãããã®é¢æ°ã¯ã<function>pcntl_waitpid</function>ã®ã³ã¼ã«ããªã + ã·ã§ã³<literal>WUNTRACED</literal>ãç¨ãã¦ããå ´åã®ã¿ä½¿ç¨å¯è½ã§ + ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function>. + <function>pcntl_waitpid</function>ãåç §ä¸ããã </para> </refsect1> </refentry> - <refentry id="function.pcntl-wstopsig"> <refnamediv> <refname>pcntl_wstopsig</refname> @@ -552,18 +554,18 @@ </funcprototype> </funcsynopsis> <para> - Returns the number of the signal which caused the child to stop. - This function is only useful if - <function>pcntl_wifstopped</function> returned &true;. + åããã»ã¹ã忢ãããã·ã°ãã«çªå·ãè¿ãã¾ãããã®é¢æ°ã¯ã + <function>pcntl_wifstopped</function>ã&true;ãè¿ãå ´åã®ã¿æç¨ã§ + ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wifstopped</function>. + <function>pcntl_waitpid</function>ã + <function>pcntl_wifstopped</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -584,23 +586,46 @@ </funcprototype> </funcsynopsis> <para> - Returns the number of the signal that caused the child process to - terminate. This function is only useful if - <function>pcntl_wifsignaled</function> returned &true;. + åããã»ã¹ãçµäºãããã·ã°ãã«ã®æ°ãè¿ãã¾ãããã®é¢æ°ã¯ã + <function>pcntl_wifsignaled</function>ã&true;ãè¿ãå ´åã®ã¿æç¨ + ã§ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function>, - <function>pcntl_signal</function> and - <function>pcntl_wifsignaled</function>. + <function>pcntl_waitpid</function>, + <function>pcntl_signal</function>, + <function>pcntl_wifsignaled</function>ãåç §ä¸ããã </para> </refsect1> </refentry> + <refentry id='function.pcntl-exec'> + <refnamediv> + <refname>pcntl_exec</refname> + <refpurpose> + ã«ã¬ã³ãã®ããã»ã¹ç©ºéã§æå®ããããã°ã©ã ãå®è¡ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>pcntl_exec</function></funcdef> + <paramdef>string <parameter>path</parameter></paramdef> + <paramdef>array <parameter><optional>args</optional></parameter></paramdef> + <paramdef>array <parameter><optional>envs</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + </reference> <!-- Keep this comment at the end of the file Index: phpdoc/ja/functions/pcre.xml diff -u phpdoc/ja/functions/pcre.xml:1.30 phpdoc/ja/functions/pcre.xml:1.31 --- phpdoc/ja/functions/pcre.xml:1.30 Sun Jan 20 12:54:12 2002 +++ phpdoc/ja/functions/pcre.xml Sat Jan 26 10:38:34 2002 @@ -1,9 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.31 $ --> <reference id="ref.pcre"> <title>Perläºæã®æ£è¦è¡¨ç¾é¢æ°</title> <titleabbrev>PCRE</titleabbrev> <partintro> + <note> + <para> + PHPã¯ã<link linkend="ref.regex">POSIXæ¡å¼µæ£è¦è¡¨ç¾é¢æ°</link>ãç¨ + ãã¦POSIXæ¡å¼µæ§æãç¨ããæ£è¦è¡¨ç¾ããµãã¼ããã¦ãã¾ãã + </para> + </note> <para> ãã®é¢æ°ã§ä½¿ç¨ããããã¿ã¼ã³ã«é¢ããæ§æã¯ãPerl ã«é常ã«ãã似㦠ãã¾ããå¼ã¯ãããªãã¿ãä¾ãã°ã¹ã©ãã·ã¥ (/) ã§å²ã¾ããå¿ è¦ããã @@ -56,6 +63,12 @@ <simpara> Perläºæã®æ£è¦è¡¨ç¾é¢æ°ã¯ãPHP 4ããã³PHP 3.0.9以éã§å©ç¨å¯è½ã§ãã </simpara> + <simpara> + æ£è¦è¡¨ç¾ã¯ãPhilip Hazelã§æ¸ãããthe University of Cambridge, + Englandã«è使¨©ããããªã¼ãã³ã½ã¼ã¹ã½ããã¦ã¨ã¢ã®PCREã©ã¤ãã©ãªãã + ã±ã¼ã¸ã§ãµãã¼ãããã¾ãã<ulink + url="&url.pcre;">&url.pcre;</ulink>ã§å©ç¨å¯è½ã§ãã + </simpara> </note> </partintro> @@ -97,17 +110,20 @@ <example> <title>æåå"php"ãæ¢ã</title> <programlisting role="php"> +<![CDATA[ // ãã©ã¡ã¼ã¿ã®ããªãã¿ã®å¾ã®"i"ã¯å¤§æåå°æåãåºå¥ããªãæ¤ç´¢ã示ãã¾ã if (preg_match ("/php/i", "PHP is the web scripting language of choice.")) { print "A match was found."; } else { print "A match was not found."; } +]]> </programlisting> </example> <example> <title>åèª"web"ãæ¢ã</title> <programlisting role="php"> +<![CDATA[ // ãã¿ã¼ã³å ã®\bã¯åèªã®å¢çã示ãã¾ãããã®ãããç¬ç«ããåèªã® // "web"ã«ã®ã¿ããããã"webbing" ã¾ã㯠"cobweb"ã®ãããªåèªã®ä¸ // é¨ã«ã¯ããããã¾ãã @@ -121,11 +137,13 @@ } else { print "ããããããã®ã¯ã¿ã¤ããã¾ããã§ããã"; } +]]> </programlisting> </example> <example> <title>URLãããã¡ã¤ã³åãå¾ã</title> <programlisting role="php"> +<![CDATA[ // URLãããã¹ãåãå¾ã preg_match("/^(http:\/\/)?([^\/]+)/i", "http://www.php.net/index.html", $matches); @@ -133,11 +151,14 @@ // ãã¹ãåã®æå¾ã®äºã¤ãå¾ã preg_match("/[^\.\/]+\.[^\.\/]+$/",$host,$matches); echo "ãã¡ã¤ã³å: ".$matches[0]."\n"; +]]> </programlisting> </example> ãã®ä¾ã®åºåã¯ä»¥ä¸ã¨ãªãã¾ãã <programlisting> +<![CDATA[ domain name is: php.net +]]> </programlisting> <function>preg_match_all</function>, <function>preg_replace</function>, @@ -188,18 +209,22 @@ æååã®é åã§ãããã¨ãã£ãé çªã¨ãªãã¾ãã <informalexample> <programlisting role="php"> -preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", - "<b>example: </b><div align=left>this a test</div>", +<![CDATA[ +preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", + "<b>example: </b><div align=left>this a test</div>", $out, PREG_PATTERN_ORDER); print $out[0][0].", ".$out[0][1]."\n"; -print $out[1][0].", ".$out[1][1]."\n" +print $out[1][0].", ".$out[1][1]."\n"; +]]> </programlisting> </informalexample> ãã®ä¾ã®åºåã¯ä»¥ä¸ã®ããã«ãªãã¾ãã <informalexample> <programlisting> -<b>example: </b>, <div align=left>this is a test</div> +<![CDATA[ +<b>example: </b>, <div align=left>this is a test</div> example: , this is a test +]]> </programlisting> </informalexample> $out[0]ã¯ããã¿ã¼ã³å ¨ä½ã«ãããããæååã®é åãæãã¦ããã @@ -216,18 +241,22 @@ ã¨ãã£ãé åºã¨ãªãã¾ãã <informalexample> <programlisting role="php"> -preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", - "<b>example: </b><div align=left>this a test</div>", +<![CDATA[ +preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", + "<b>example: </b><div align=left>this a test</div>", $out, PREG_SET_ORDER); print $out[0][0].", ".$out[0][1]."\n"; -print $out[1][0].", ".$out[1][1]."\n" +print $out[1][0].", ".$out[1][1]."\n"; +]]> </programlisting> </informalexample> ãã®ä¾ã®åºåã¯ä»¥ä¸ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -<b>example: </b>, example: -<div align=left>this is a test</div>, this is a test +<![CDATA[ +<b>example: </b>, example: +<div align=left>this is a test</div>, this is a test +]]> </programlisting> </informalexample> ãã®å ´åã$matches[0] ã¯æåã«ãããããçµã§ããã @@ -253,8 +282,10 @@ <example> <title>ããã¹ãããå ¨ã¦ã®é»è©±çªå·ãå¾ã</title> <programlisting role="php"> +<![CDATA[ preg_match_all ("/\(? (\d{3})? \)? (?(1) [\-\s] ) \d{3}-\d{4}/x", "Call 555-1212 or 1-800-555-1212", $phones); +]]> </programlisting> </example> </para> @@ -262,32 +293,36 @@ <example> <title>HTMLã¿ã°ã«ããããããã®ãè¦ä»ãã(greedy)</title> <programlisting role="php"> +<![CDATA[ // \\2 ã¯å¾æ¹åç §ã®ä¾ã§ããããã¯ãpcre ã«æ£è¦è¡¨ç¾èªä½ã®æ¬å¼§ã®2çªç®ã® // çµãã¤ã¾ããã®å ´åã¯([\w]+)ãã«ããããã¾ããæååãäºéå¼ç¨ç¬¦ã§æ¬ // ããã¦ãããããããã¯ã¹ã©ãã·ã¥ã®è¿½å ãå¿ è¦ã§ãã -$html = "<b>bold text</b><a href=howdy.html>click me</a>"; +$html = "<b>bold text</b><a href=howdy.html>click me</a>"; -preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $html, $matches); +preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $html, $matches); -for ($i=0; $i< count($matches[0]); $i++) { - echo "matched: ".$matches[0][$i]."\n"; - echo "part 1: ".$matches[1][$i]."\n"; - echo "part 2: ".$matches[3][$i]."\n"; - echo "part 3: ".$matches[4][$i]."\n\n"; +for ($i=0; $i< count($matches[0]); $i++) { + echo "matched: ".$matches[0][$i]."\n"; + echo "part 1: ".$matches[1][$i]."\n"; + echo "part 2: ".$matches[3][$i]."\n"; + echo "part 3: ".$matches[4][$i]."\n\n"; } +]]> </programlisting> </example> ãã®ä¾ã®åºåã¯ä»¥ä¸ã¨ãªãã¾ãã <programlisting> -matched: <b>bold text</b> -part 1: <b> +<![CDATA[ +matched: <b>bold text</b> +part 1: <b> part 2: bold text -part 3: </b> +part 3: </b> -matched: <a href=howdy.html>click me</a> -part 1: <a href=howdy.html> +matched: <a href=howdy.html>click me</a> +part 1: <a href=howdy.html> part 2: click me -part 3: </a> +part 3: </a> +]]> </programlisting> </para> <simpara> @@ -381,22 +416,28 @@ <example> <title>è¤æ°ã®å¤ãç½®æãã</title> <programlisting role="php"> +<![CDATA[ $patterns = array ("/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/", "/^\s*{(\w+)}\s*=/"); $replace = array ("\\3/\\4/\\1\\2", "$\\1 ="); print preg_replace ($patterns, $replace, "{startDate} = 1999-5-27"); +]]> </programlisting> </example> ãã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã <programlisting> - $startDate = 5/27/1999 +<![CDATA[ +$startDate = 5/27/1999 +]]> </programlisting> <example> <title>/e 修飾åã®ä½¿ç¨æ³</title> <programlisting role="php"> -preg_replace ("/(<\/?)(\w+)([^>]*>)/e", +<![CDATA[ +preg_replace ("/(<\/?)(\w+)([^>]*>)/e", "'\\1'.strtoupper('\\2').'\\3'", $html_body); +]]> </programlisting> <para> å ¥åããã¹ãã®å ¨ã¦ã®HTMLã¿ã°ã大æåã«å¤æãã¾ãã @@ -405,33 +446,34 @@ <example> <title>HTMLãããã¹ãã«å¤æãã</title> <programlisting role="php"> +<![CDATA[ // $document ã«ã¯ãHTMLããã¥ã¡ã³ããå«ã¾ãã¦ããå¿ è¦ãããã¾ãã // ãã®ããã¥ã¡ã³ãã®HTMLã¿ã°ããã³javascriptã®é¨åã¨ç©ºç½æåã // åé¤ãã¾ããã¾ããããã¤ãã®HTMLã¨ã³ãã£ãã£ãç価ãªããã¹ãã« // 夿ãã¾ãã -$search = array ("'<script[^>]*?>.*?</script>'si", +$search = array ("'<script[^>]*?>.*?</script>'si", // javascriptãåé¤ - "'<[\/\!]*?[^<>]*?>'si", // htmlã¿ã°ãåé¤ + "'<[\/\!]*?[^<>]*?>'si", // htmlã¿ã°ãåé¤ "'([\r\n])[\s]+'", // ç©ºç½æåãåé¤ - "'&(quot|#34);'i", // htmlã¨ã³ãã£ãã£ãç½®æ - "'&(amp|#38);'i", - "'&(lt|#60);'i", - "'&(gt|#62);'i", - "'&(nbsp|#160);'i", - "'&(iexcl|#161);'i", - "'&(cent|#162);'i", - "'&(pound|#163);'i", - "'&(copy|#169);'i", - "'&#(\d+);'e"); // phpã¨ãã¦è©ä¾¡ + "'&(quot|#34);'i", // htmlã¨ã³ãã£ãã£ãç½®æ + "'&(amp|#38);'i", + "'&(lt|#60);'i", + "'&(gt|#62);'i", + "'&(nbsp|#160);'i", + "'&(iexcl|#161);'i", + "'&(cent|#162);'i", + "'&(pound|#163);'i", + "'&(copy|#169);'i", + "'&#(\d+);'e"); // phpã¨ãã¦è©ä¾¡ $replace = array ("", "", "\\1", "\"", - "&", - "<", - ">", + "&", + "<", + ">", " ", chr(161), chr(162), @@ -440,6 +482,7 @@ "chr(\\1)"); $text = preg_replace ($search, $replace, $document); +]]> </programlisting> </example> </para> @@ -562,21 +605,28 @@ æ¤ç´¢æååã®é¨åãåå¾ãã¾ãã </para> <programlisting role="php"> +<![CDATA[ // " ", \r, \t, \n , \f ãå«ãã«ã³ãã¾ãã¯ç©ºç½æåã§å¥ãåå²ãã¾ãã $keywords = preg_split ("/[\s,]+/", "hypertext language, programming"); +]]> </programlisting> <para> æååãæåè¦ç´ ã«åå²ãã¾ãã </para> <programlisting role="php"> +<![CDATA[ $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); +]]> </programlisting> </example> <para> + <function>spliti</function>, + <function>split</function>, + <function>implode</function>, <function>preg_match</function>, - <function>preg_match_all</function>, + <function>preg_match_all</function>, <function>preg_replace</function>ãåç §ä¸ããã </para> </refsect1> @@ -622,23 +672,26 @@ <example> <title><function>preg_quote</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $keywords="$40 for a g3/400"; $keywords = preg_quote ($keywords, "/"); echo $keywords; // \$40 for a g3\/400 ãè¿ãã¾ãã +]]> </programlisting> </example> <example> <title>ããã¹ãã®ä¸ã®åèªãç½®æãã</title> <programlisting role="php"> - +<![CDATA[ // ãã®ä¾ã§ã¯ãpreg_quote($word) ãæ£è¦è¡¨ç¾ã®ç¹æ®æåã§ããã¢ã¹ã¿ãªã¹ // ã¯ãä¿æããããã«ä½¿ç¨ããã¦ãã¾ãã $textbody = "This book is *very* hard to find."; $word = "*very*"; $textbody = preg_replace ("/".preg_quote($word)."/", - "<i>".$word."</i>", + "<i>".$word."</i>", $textbody); +]]> </programlisting> </example> </para> @@ -673,13 +726,14 @@ ã«ããè¿ãããé åã«<function>array_values</function>ãé©ç¨ãã¦ä¸ ããã </para> - <para> <example> <title><function>preg_grep</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // æµ®åå°æ°ç¹æ°ãå«ãå ¨ã¦ã®é åè¦ç´ ãè¿ã $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); +]]> </programlisting> </example> </para> @@ -688,7 +742,7 @@ <refentry id="pcre.pattern.modifiers"> <refnamediv> - <refname>Pattern Modifiers</refname> + <refname>ãã¿ã¼ã³ä¿®æ£å</refname> <refpurpose>æ£è¦è¡¨ç¾ãã¿ã¼ã³ã§ä½¿ç¨å¯è½ãªä¿®é£¾åãå¾ã</refpurpose> </refnamediv> <refsect1> @@ -848,7 +902,7 @@ <simpara> ãã®ä¿®æ£åã¯ãPerléäºæãªPCREã®æ©è½ãæå¹ã«ãã¾ãããã¿ã¼ã³ æååã¯ãUTF-8ã¨ã³ã³ã¼ããããæååã¨ãã¦å¦çããã¾ããã - ã®ä¿®æ£åã¯ãPHP-4.0.7以éã§ä½¿ç¨å¯è½ã§ãã + ã®ä¿®æ£åã¯ãPHP-4.1.0以éã§ä½¿ç¨å¯è½ã§ãã </simpara> </listitem> </varlistentry> @@ -875,291 +929,693 @@ <refsect1> <title>Perl ã¨ã®å·®</title> - <literallayout> - ããã§èª¬æããã®ã¯ãPerl 5.005 ã«é¢é£ãããã®ã§ãã - - 1. ããã©ã«ãã§ã¯ç©ºç½æå㯠C ã©ã¤ãã©ãªé¢æ° isspace() ã - èªèããå ¨ã¦ã®æåã§ãããå¥ã®æååãã¼ãã«ãç¨ãã¦PCREã - ã³ã³ãã¤ã«ãããã¨ãå¯è½ã§ãã - é常ãisspace() ã¯ç©ºç½ããã©ã¼ã ãã£ã¼ããæ¹è¡ãè¤æ¹ã - æ°´å¹³ã¿ããåç´ã¿ãã«ããããã¾ãã - Perl 5 ã§ã¯ããç©ºç½æåã®ä¸ã«åç´ã¿ããå«ãã§ãã¾ããã - ããªãåãã Perl ããã¥ã¡ã³ãã«ãã£ã \v ã¨ã¹ã±ã¼ãã¯ã - å®éã¯èªèããã¦ãã¾ããã§ããã - ãããããã®æåèªä½ã¯å°ãªãã¨ã 5.002 ã¾ã§ã¯ç©ºç½æåã¨ã㦠- å¦çããã¦ãã¾?_ã - 5.004 ããã³ 5.005 ã§ã¯ããã®æå㯠\s ã«ããããã¾ããã - - 2. PCRE ã§ã¯ãå èªã¿è¨æ(assertion)æã«ç¹°ãè¿ãæ°ã®æå®ã使ç¨ã§ãã¾ããã - Perl ã¯ããã許å¯ãã¾ãããæå³ããéãã«åä½ãããã¨ã - æå³ããããã§ã¯ããã¾ããã - ä¾ãã°ã(?!a){3} ã¯ã次ã®3æåã "a" ã§ãªããã¨ã - è¨æããããã§ã¯ããã¾ããã - ãã®æå®ã¯ãæ¬¡ã®æåã "a" ã§ã¯ãªããã¨ã3åè¨æããã ãã§ãã - - 3. å¦å®ã®å èªã¿è¨æã®ä¸ã§çãããµããã¿ã¼ã³ãåå¾ããåæ°ã¯è¨ç®ãã - ã¾ããããªãã»ãããã¯ãã«ã®ä¸ã®å¯¾å¿ããã¨ã³ããªã¯è¨å®ããã¾ããã - Perl ã§ã¯ãè¨æã®ãããã³ã°ã«å¤±æããåã«ããããã - ãã¿ã¼ã³ãããã®å¤æ°ãè¨å®ãã¾ããããããè¡ãããã®ã¯ã - å¦å®ã®å èªã¿è¨æã®æã1ã¤ã ãã®å ´åã®ã¿ã§ãã - - 4. ãã«æåæåã¯ãæ¤ç´¢å¯¾è±¡æååã§ãµãã¼ãããã¾ããã - ãã¿ã¼ã³æååã§ã¯ãµãã¼ãããã¾ããã - ããã¯ããã¿ã¼ã³æååã¯ã0 ãçµç«¯ã¨ããé常㮠C æååã¨ã㦠- 渡ãããããã§ãã - ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ "\0" ã¯ããã«æåã表ããã¿ã¼ã³ã¨ã㦠- 使ç¨ãããã¨ãå¯è½ã§ãã - - 5. 次㮠Perl ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã¯ããµãã¼ãããã¾ããã: - \l, \u, \L, \U, \E, \Q - å®éãPerl ã§ã¯ããããã¯ãã¿ã¼ã³ãããã³ã°ã¨ã³ã¸ã³ã®é¨åã§ã¯ãªãã - éå¸¸ã®æååå¦çã®é¨åã«å®è¨¼ããã¦ãã¾ãã - - 6. Perl ã® \G è¨æã¯ãä¸åã®ãã¿ã¼ã³ãããã«é¢ãããã®ã§ã¯ãªãããã - ãµãã¼ãããã¾ããã - - 7. æç¢ºã«è¿°ã¹ãã¨ãPCRE 㯠(?{code}) æ§é ããµãã¼ããã¾ããã - - 8. - Perl 5.005_02 ã§ã¯ãæ¸ããã¿æã« - ãã¿ã¼ã³ã®ä¸é¨ãç¹°ãè¿ãéã«å?ããæååã®è¨å®ã«é¢é£ãã - å¥å¦ãªåä½ãè¦ããããã¾ãã - ä¾ãã°ã"aba" ããã¿ã¼ã³ /^(a(b)?)+$/ ã«ãããã³ã°ããå ´åã - $2 ã«ã¯ãå¤ "b" ãè¨å®ããã¾ããã"aabbaa" ã /^(aa(bb)?)+$/ - ã«ããããããå ´åã$2 ã¯è¨å®ããã¾ããã - ãããããã¿ã¼ã³ã/^(aa(b(b))?)+$/ã«å¤ããã¨ã$2 (ããã³ $3) - ãè¨å®ããã¾ãã - - Perl 5.004 ã§ã¯ã$2 ã¯ã©ã¡ã?±ã¼ã¹ã§ãè¨å®ããã¾ãã - ããã¯ãPCRE ã§ãå¦Çã§ããå°¦?çã« Perl ãå¥ã®çç¾ã®ãªã - ç¶æ ã«å¤æ´ãããå ´åãPCRE ã追å¾ããå¯è½æ§ãããã¾ãã - - 9. ä»ã®æªè§£æ±ºã®çç¾ã¯ãPerl 5.005_02 ã§ã¯ããã¿ã¼ã³ - /^(a)?(?(1)a|b)+$/ ã¯æåå "a" ã«ããããã¾ããã - PCRE ã§ã¯ãããããªãã¨ãããã¨ã§ãã - ããããPerl 㨠PCRE ã¯å ±ã« /^(a)?a/ ã§ "a" ãããããã - å ´åã« $1 ãæªå®ç¾©ã®ã¾ã¾ã¨ãªãã¾ãã - - 10. PCRE ã¯ãPerl æ£è¦è¡¨ç¾ã®æ©è½ã«ããã¤ãã®æ¡å¼µæ©è½ãæä¾ãã¾ãã - - (a) å èªã¿è¨æã¯ãåºå®é·ã®æååã«ãããããå¿ è¦ãããã¾ããã - å èªã¿è¨æã®å¥ã®åæã¯ãç°ãªã£ãé·ãã®æååã«ããããããã¨ã - ã§ãã¾ããPerl 5.005 ã§ã¯å ¨ã¦åãé·ãã§ããå¿ è¦ãããã¾ãã - - (b) PCRE_DOLLAR_ENDONLY ãè¨å®ããã¦ãããPCRE_MULTILINE ã - è¨å®ããã¦ããªãå ´åãã¡ã¿æå $ ã¯ãæååã®çµç«¯ã«ã®ã¿ããããã¾ãã - - (c) PCRE_EXTRA ãè¨å®ããã¦ããå ´åãããã¯ã¹ã©ãã·ã¥ã®å¾ã« - æåããã£ã¦ç¹ã«æå³ããªããã®ã¯ãã¨ã©ã¼ã¨ãªãã¾ãã - - (d) PCRE_UNGREEDY ãè¨å®ããã¦ãã¥4åãããã©ã«ãã§ã¯ - 貪欲ã§ãªãç¹°ãè¿ãæå®åã®è²ªæ¬²ãã¯å転ãã¾ããã - çå符ãå¾ãã«ã¤ãå ´åã¯ã貪欲ã«ãªãã¾ãã - </literallayout> + <para> + ããã§èª¬æããã®ã¯ãPerl 5.005 ã«é¢é£ãããã®ã§ãã + <orderedlist> + <listitem> + <simpara> + ããã©ã«ãã§ã¯ç©ºç½æå㯠C ã©ã¤ãã©ãªé¢æ° isspace() ãèªèãã + å ¨ã¦ã®æåã§ãããå¥ã®æååãã¼ãã«ãç¨ãã¦PCREãã³ã³ãã¤ã«ã + ããã¨ãå¯è½ã§ããé常ãisspace() ã¯ç©ºç½ããã©ã¼ã ãã£ã¼ããæ¹ + è¡ãè¤æ¹ãæ°´å¹³ã¿ããåç´ã¿ãã«ããããã¾ããPerl 5 ã§ã¯ããç©ºç½ + æåã®ä¸ã«åç´ã¿ããå«ãã§ãã¾ãããããªãåãã Perl ããã¥ã¡ + ã³ãã«ãã£ã \v ã¨ã¹ã±ã¼ãã¯ãå®éã¯èªèããã¦ãã¾ããã§ããã + ãããããã®æåèªä½ã¯å°ãªãã¨ã 5.002 ã¾ã§ã¯ç©ºç½æåã¨ãã¦å¦ç + ããã¦ãã¾ãã5.004 ããã³ 5.005 ã§ã¯ããã®æå㯠\s ã«ãããã + ã¾ããã + </simpara> + </listitem> + <listitem> + <simpara> + PCREã§ã¯ãå èªã¿è¨æ(assertion)æã«ç¹°ãè¿ãæ°ã®æå®ã使ç¨ã§ãã¾ + ãããPerlã¯ããã許å¯ãã¾ãããæå³ããéãã«åä½ãããã¨ãæ + å³ããããã§ã¯ããã¾ãããä¾ãã°ã(?!a){3} ã¯ã次ã®3æåã "a" + ã§ãªããã¨ãè¨æããããã§ã¯ããã¾ããããã®æå®ã¯ãæ¬¡ã®æåã + "a" ã§ã¯ãªããã¨ã3åè¨æããã ãã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + å¦å®ã®å èªã¿è¨æã®ä¸ã§çãããµããã¿ã¼ã³ãåå¾ããåæ°ã¯è¨ç®ã + ãã¾ããããªãã»ãããã¯ãã«ã®ä¸ã®å¯¾å¿ããã¨ã³ããªã¯è¨å®ããã¾ + ãããPerlã§ã¯ãè¨æã®ãããã³ã°ã«å¤±æããåã«ããããããã¿ã¼ + ã³ãããã®å¤æ°ãè¨å®ãã¾ããããããè¡ãããã®ã¯ãå¦å®ã®å èªã¿ + è¨æã®æã1ã¤ã ãã®å ´åã®ã¿ã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + ãã«æåæåã¯ãæ¤ç´¢å¯¾è±¡æååã§ãµãã¼ãããã¾ããããã¿ã¼ã³æ + ååã§ã¯ãµãã¼ãããã¾ãããããã¯ããã¿ã¼ã³æååã¯ã0ãçµç«¯ã¨ + ããé常ã®Cæååã¨ãã¦æ¸¡ãããããã§ããã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ + "\0"ã¯ããã«æåã表ããã¿ã¼ã³ã¨ãã¦ä½¿ç¨ãããã¨ãå¯è½ã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + 次ã®Perlã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã¯ããµãã¼ãããã¾ããã: \l, \u, + \L, \U, \E, \Q å®éãPerlã§ã¯ããããã¯ãã¿ã¼ã³ãããã³ã°ã¨ã³ + ã¸ã³ã®é¨åã§ã¯ãªããéå¸¸ã®æååå¦çã®é¨åã«å®è¨¼ããã¦ãã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + Perlã®\Gè¨æã¯ãä¸åã®ãã¿ã¼ã³ãããã«é¢ãããã®ã§ã¯ãªãããã + ãµãã¼ãããã¾ããã + </simpara> + </listitem> + <listitem> + <simpara> + æç¢ºã«è¿°ã¹ãã¨ãPCREã¯(?{code})æ§é ããµãã¼ããã¾ããã + </simpara> + </listitem> + <listitem> + <simpara> + Perl 5.005_02ã§ã¯ãæ¸ããã¿æã«ãã¿ã¼ã³ã®ä¸é¨ãç¹°ãè¿ãéã«åå¾ + ããæååã®è¨å®ã«é¢é£ããå¥å¦ãªåä½ãè¦ããããã¾ããä¾ãã°ã + "aba"ããã¿ã¼ã³/^(a(b)?)+$/ã«ãããã³ã°ããå ´åã$2ã«ã¯ãå¤"b" + ãè¨å®ããã¾ããã"aabbaa"ã/^(aa(bb)?)+$/ã«ããããããå ´åã + $2ã¯è¨å®ããã¾ããããããããã¿ã¼ã³ã/^(aa(b(b))?)+$/ã«å¤ãã + ã¨ã$2 (ããã³ $3)ãè¨å®ããã¾ããPerl 5.004ã§ã¯ã$2 ã¯ã©ã¡ãã® + ã±ã¼ã¹ã§ãè¨å®ããã¾ãPCREã§ã&true;ã«è¨å®ããã¾ããå°æ¥çã« + Perlãå¥ã®çç¾ã®ãªãç¶æ ã«å¤æ´ãããå ´åãPCREã追å¾ããå¯è½æ§ + ãããã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + ä»ã®æªè§£æ±ºã®çç¾ã¯ãPerl 5.005_02 ã§ã¯ããã¿ã¼ã³ + /^(a)?(?(1)a|b)+$/ ã¯æåå "a" ã«ããããã¾ãããPCRE ã§ã¯ãã + ãããªãã¨ãããã¨ã§ããããããPerl 㨠PCRE ã¯å ±ã« /^(a)?a/ ã§ + "a" ããããããå ´åã« $1 ãæªå®ç¾©ã®ã¾ã¾ã¨ãªãã¾ãã + </simpara> + </listitem> + <listitem> + <para> + PCREã¯ãPerlæ£è¦è¡¨ç¾ã®æ©è½ã«ããã¤ãã®æ¡å¼µæ©è½ãæä¾ãã¾ãã + <orderedlist> + <listitem> + <simpara> + å èªã¿è¨æã¯ãåºå®é·ã®æååã«ãããããå¿ è¦ãããã¾ãããå + èªã¿è¨æã®å¥ã®åæã¯ãç°ãªã£ãé·ãã®æååã«ããããããã¨ã + ã§ãã¾ããPerl 5.005 ã§ã¯å ¨ã¦åãé·ãã§ããå¿ è¦ãããã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + <link + linkend="pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLY</link>ã + è¨å®ããã¦ããã<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãè¨å® + ããã¦ããªãå ´åãã¡ã¿æå$ã¯ãæååã®çµç«¯ã«ã®ã¿ããããã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + <link linkend="pcre.pattern.modifiers">PCRE_EXTRA</link>ãè¨ + å®ããã¦ããå ´åãããã¯ã¹ã©ãã·ã¥ã®å¾ã«æåããã£ã¦ç¹ã«æå³ + ããªããã®ã¯ãã¨ã©ã¼ã¨ãªãã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + <link linkend="pcre.pattern.modifiers">PCRE_UNGREEDY</link>ã + è¨å®ããã¦ããå ´åãããã©ã«ãã§ã¯è²ªæ¬²ã§ãªãç¹°ãè¿ãæå®åã® + 貪欲ãã¯å転ãã¾ãããçå符ãå¾ãã«ã¤ãå ´åã¯ã貪欲ã«ãªãã¾ãã + </simpara> + </listitem> + </orderedlist> + </para> + </listitem> + </orderedlist> + </para> </refsect1> <refsect1 id="regexp.reference"> <title>æ£è¦è¡¨ç¾ã®è©³ç´°</title> <refsect2 id="regexp.introduction"> <title>å°å ¥</title> - <literallayout> - PCRE ã«ãããµãã¼ããããæ£è¦è¡¨ç¾ã®æ§æã以ä¸ã«ç¤ºãã¾ãã - æ£è¦è¡¨ç¾ã¯ãPerl ã®ããã¥ã¡ã³ããä»ã®å¤ãã®æ¸ç±ã«ãã㦠- è±å¯ãªä¾ã¨å ±ã«èª¬æããã¦ãã¾ãã - Jeffrey Friedl ãæ¸ãã O'Reilly çºåã® - "Mastering Regular Expressions" ã«ã¯ã詳細ã示ããã¦ãã¾ãã - ããã§ã®èª¬æã¯ãªãã¡ã¬ã³ã¹ããã¥ã¡ã³ãã¨ãã¦ä½¿ç¨ãããã¨ã - æå³ãã¦ãã¾ãã + <para> + PCREã«ãããµãã¼ããããæ£è¦è¡¨ç¾ã®æ§æã以ä¸ã«ç¤ºãã¾ãã + æ£è¦è¡¨ç¾ã¯ãPerlã®ããã¥ã¡ã³ããä»ã®å¤ãã®æ¸ç±ã«ãã㦠+ è±å¯ãªä¾ã¨å ±ã«èª¬æããã¦ãã¾ãã + Jeffrey Friedl ãæ¸ãã O'Reilly çºåã® + "Mastering Regular Expressions" ã«ã¯ã詳細ã示ããã¦ãã¾ãã + ããã§ã®èª¬æã¯ãªãã¡ã¬ã³ã¹ããã¥ã¡ã³ãã¨ãã¦ä½¿ç¨ãããã¨ã + æå³ãã¦ãã¾ãã - æ£è¦è¡¨ç¾ã¯ãã¿ã¼ã³ã§ãããæ¤ç´¢å¯¾è±¡æååã«å¯¾ãã¦å·¦ããå³ã«ãããã³ã°ã - è¡ããã¾ãã - ãã¿ã¼ã³ã®ä¸ã®å¤ãã®æåã¯ããèªä½ã表ããæ¤ç´¢å¯¾è±¡ã®å¯¾å¿ããæåã« - ããããã¾ããç°¡åãªä¾ããããã¨ã次ã®ãã¿ã¼ã³ - - The quick brown fox - - ã¯ãæ¤ç´¢å¯¾è±¡æååã®ããèªä½ã¨åãé¨åã«ããããã¾ãã - </literallayout> + æ£è¦è¡¨ç¾ã¯ãã¿ã¼ã³ã§ãããæ¤ç´¢å¯¾è±¡æååã«å¯¾ãã¦å·¦ããå³ã«ãããã³ã°ã + è¡ããã¾ãã + ãã¿ã¼ã³ã®ä¸ã®å¤ãã®æåã¯ããèªä½ã表ããæ¤ç´¢å¯¾è±¡ã®å¯¾å¿ããæåã« + ããããã¾ããç°¡åãªä¾ããããã¨ããã¿ã¼ã³ + <literal>The quick brown fox</literal> + ã¯ãæ¤ç´¢å¯¾è±¡æååã®ããèªä½ã¨åãé¨åã«ããããã¾ãã + </para> </refsect2> <refsect2 id="regexp.reference.meta"> <title>ã¡ã¿æå</title> - <literallayout> - æ£è¦è¡¨ç¾ã®å¼·åãã¯ããã¿ã¼ã³ä¸ã«è¤æ°ã®é¸æè¢ãç¹°ãè¿ã - ãå«ãè½åã«ãããã®ã§ãã - ãããã¯ã<emphasis>ã¡ã¿</emphasis>-<emphasis>æå</emphasis> ã - 使ç¨ãããã¿ã¼ã³ã«ããã¨ã³ã³ã¼ãããã¾ãã - ã¡ã¿æåã¯ããèªä½ã表ãã¾ãããã代ããã«ç¹æã®è§£éãè¡ããã¾ãã - - 2種é¡ã®ã¡ã¿æåãåå¨ãã¾ããçæ¹ã¯ããã©ã±ããã®ä¸ä»¥å¤ã«ãããã¿ã¼ã³ - ã§ä½¿ç¨å¯è½ãªãã®ã§ãããçæ¹ã¯ããã©ã±ããã®ä¸ã§ä½¿ç¨å¯è½ãªãã®ã§ãã - ãã©ã±ããã®å¤ã§ä½¿ç¨ãããã¡ã¿æåã«ã¯æ¬¡ã®ãããªãã®ãããã¾ãã - - \ ä¸è¬çãªã¨ã¹ã±ã¼ãæå - ^ æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®å§ã¾ããè¨æ - $ æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®çµãããè¨æ - . (ããã©ã«ãã§ã¯)æ¹è¡ãé¤ãå ¨ã¦ã®æåã«ããã - [ æåã¯ã©ã¹éå§ãå®ç¾© - | 鏿æã®éå§ - ( ãµããã¿ã¼ã³ã®éå§ - ) ãµããã¿ã¼ã³ã®çµäº - ? ( ã®æå³ãæ¡å¼µãã - ã¾ãã¯ã0 ã¾ãã¯1 åã®ç¹°ãè¿ã - ã¾ãã¯ãç¹°ãè¿ããæå°åãã - * 0 以ä¸ã®ç¹°ãè¿ã - + 1 以ä¸ã®ç¹°ãè¿ã - { æå°/æå¤§ç¹°ãè¿ãã®éå§ + <para> + æ£è¦è¡¨ç¾ã®å¼·åãã¯ããã¿ã¼ã³ä¸ã«è¤æ°ã®é¸æè¢ãç¹°ãè¿ããå«ãè½å + ã«ãããã®ã§ãããããã¯ã<emphasis>ã¡ã¿</emphasis>-<emphasis>æ + å</emphasis>ã使ç¨ãããã¿ã¼ã³ã«ããã¨ã³ã³ã¼ãããã¾ãã + ã¡ã¿æåã¯ããèªä½ã表ãã¾ãããã代ããã«ç¹æã®è§£éãè¡ããã¾ãã + </para> + <para> + 2種é¡ã®ã¡ã¿æåãåå¨ãã¾ããçæ¹ã¯ããã©ã±ããã®ä¸ä»¥å¤ã«ãããã¿ã¼ã³ + ã§ä½¿ç¨å¯è½ãªãã®ã§ãããçæ¹ã¯ããã©ã±ããã®ä¸ã§ä½¿ç¨å¯è½ãªãã®ã§ãã + ãã©ã±ããã®å¤ã§ä½¿ç¨ãããã¡ã¿æåã«ã¯æ¬¡ã®ãããªãã®ãããã¾ãã + <variablelist> + <varlistentry> + <term><emphasis>\</emphasis></term> + <listitem> + <simpara> + ä¸è¬çãªã¨ã¹ã±ã¼ãæå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>^</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®å§ã¾ããè¨æ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>$</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®çµãããè¨æ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>.</emphasis></term> + <listitem> + <simpara> + (ããã©ã«ãã§ã¯)æ¹è¡ãé¤ãå ¨ã¦ã®æåã«ããã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>[</emphasis></term> + <listitem> + <simpara> + æåã¯ã©ã¹éå§ãå®ç¾© + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>]</emphasis></term> + <listitem> + <simpara> + æåã¯ã©ã¹ã®çµäº + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>|</emphasis></term> + <listitem> + <simpara> + 鏿æã®éå§ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>(</emphasis></term> + <listitem> + <simpara> + ãµããã¿ã¼ã³ã®éå§ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>)</emphasis></term> + <listitem> + <simpara> + ãµããã¿ã¼ã³ã®çµäº + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>?</emphasis></term> + <listitem> + <simpara> + ( ã®æå³ãæ¡å¼µããã¾ãã¯ã0 ã¾ãã¯1 åã®ç¹°ãè¿ãã¾ãã¯ãç¹°ã + è¿ããæå°åãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>*</emphasis></term> + <listitem> + <simpara> + 0以ä¸ã®ç¹°ãè¿ã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>+</emphasis></term> + <listitem> + <simpara> + 1以ä¸ã®ç¹°ãè¿ã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>{</emphasis></term> + <listitem> + <simpara> + æå°/æå¤§ç¹°ãè¿ãã®éå§ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>}</emphasis></term> + <listitem> + <simpara> + æå°/æå¤§ç¹°ãè¿ãã®çµäº + </simpara> + </listitem> + </varlistentry> + </variablelist> ãã¿ã¼ã³ä¸ã§ãã©ã±ããã®ä¸ã®é¨åã¯ã"æåã¯ã©ã¹" ã¨å¼ã°ãã¾ãã æåã¯ã©ã¹ã§ä½¿ããã¡ã¿æåã¯æ¬¡ã®ãã®ã ãã§ãã - \ ä¸è¬çãªã¨ã¹ã±ã¼ãæå - ^ æåã®æåã«ç¨ããå ´åã®ã¿ãã¯ã©ã¹ãå¦å® - - æåã®ç¯å²ã示ã - ] æåã¯ã©ã¹ã®çµäº - - 次ã®ã»ã¯ã·ã§ã³ã§ãåã¡ã¿æåã®ä½¿ç¨æ³ã®èª¬æãè¡ãã¾ãã - - </literallayout> + <variablelist> + <varlistentry> + <term><emphasis>\</emphasis></term> + <listitem> + <simpara> + ä¸è¬çãªã¨ã¹ã±ã¼ãæå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>^</emphasis></term> + <listitem> + <simpara> + æåã®æåã«ç¨ããå ´åã®ã¿ãã¯ã©ã¹ãå¦å® + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>-</emphasis></term> + <listitem> + <simpara> + æåã®ç¯å²ã示ã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>]</emphasis></term> + <listitem> + <simpara> + æåã¯ã©ã¹ãçµäºãã + </simpara> + </listitem> + </varlistentry> + </variablelist> + 次ã®ã»ã¯ã·ã§ã³ã§ãåã¡ã¿æåã®ä½¿ç¨æ³ã®èª¬æãè¡ãã¾ãã + </para> </refsect2> <refsect2 id="regexp.reference.backslash"> <title>ããã¯ã¹ã©ãã·ã¥</title> - <literallayout> - ããã¯ã¹ã©ãã·ã¥ã«ã¯ãããã¤ãã®ä½¿ç¨æ³ãããã¾ããã¾ãã - è±åã§ãªãæåãå¾ã«ç¶ãå ´åããã¦?åãæãã - ç¹å¥ãªæå³ã¯å¤±ããã¾ãããã®ããã¯ã¹ã©ãã·ã¥ã®ä½¿ãæ¹ã¯ã - æåã¯ã©ã¹ã®å å´ã¨å¤å´ã®ä¸¡æ¹ã§ä½¿ç¨å¯è½ã§ãã - - ä¾ãã°ã"*" æåã«ãããããããå ´åããã¿ã¼ã³ã« "\*" ãæ¸ãã¾ãã - ããã«ãããæ¬¡ã®æåãã¡ã¿æåã¨ãã¦è§£éããããã¨ããã¾ãã¨ã"\" ãä¼´ã£ãè±åã§ãªãæåãããã®æåèªä½ã表ããã¨ãä¿è¨¼ãã¾ããç¹ã«ãããã¯ã¹ã©ãã·ã¥ã«ãããããããå ´åã¯ã"\\" ã¨æ¸ãã¾ãã - + <para> + ããã¯ã¹ã©ãã·ã¥ã«ã¯ãããã¤ãã®ä½¿ç¨æ³ãããã¾ããã¾ãã + è±åã§ãªãæåãå¾ã«ç¶ãå ´åããã¦?åãæãã + ç¹å¥ãªæå³ã¯å¤±ããã¾ãããã®ããã¯ã¹ã©ãã·ã¥ã®ä½¿ãæ¹ã¯ã + æåã¯ã©ã¹ã®å å´ã¨å¤å´ã®ä¸¡æ¹ã§ä½¿ç¨å¯è½ã§ãã + </para> + <para> + ä¾ãã°ã"*" æåã«ãããããããå ´åããã¿ã¼ã³ã« "\*" ãæ¸ãã¾ãã + ããã«ãããæ¬¡ã®æåãã¡ã¿æåã¨ãã¦è§£éããããã¨ããã¾ãã¨ã + "\" ãä¼´ã£ãè±åã§ãªãæåãããã®æåèªä½ã表ããã¨ãä¿è¨¼ãã¾ãã + ç¹ã«ãããã¯ã¹ã©ãã·ã¥ã«ãããããããå ´åã¯ã"\\" ã¨æ¸ãã¾ãã + </para> + <para> ãã¿ã¼ã³ãã PCRE_EXTENDED ãªãã·ã§ã³ãä»ãã¦ã³ã³ãã¤ã«ããã¦ãã - å ´åã(æåã¯ã©ã¹ã®ä¸ã§ãªã)ãã¿ã¼ã³å ã®ç©ºç½æåããã³ - "#" ã¨æ¬¡ã®æ¹è¡æåã®éã®æåã¯ç¡è¦ããã¾ãã - ç©ºç½æåã¾ã㯠"#" ããã¿ã¼ã³ã®ä¸é¨ã¨ãã¦å«ããéã«ã¯ã - ããã¯ã¹ã©ãã·ã¥ã«ããã¨ã¹ã±ã¼ããããã¨ãã§ãã¾ãã - - ããã¯ã¹ã©ãã·ã¥ã®2çªç®ã®ä½¿ç¨æ³ã¯ãåºåãããªãæåã - ãã¿ã¼ã³å ã«ç®ã«è¦ããå½¢ã§ã¨ã³ã³ã¼ãããææ³ãæä¾ãããã®ã§ãã - ãã¿ã¼ã³ãçµäºããããã«æåãé¤ããåºåãããªãæåã®è¦ãæ¹ã« - ã¯ä½ã®å¶ç´ãããã¾ãããããã¿ã¼ã³ãããã¹ãç·¨éããéã«ã¯ãé常 - 次ã®ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ãç¨ããæ¹ããå ã®ãã¤ããªæåããã - ããç°¡åã§ãããã - - \a ã¢ã©ã¼ã ããã«æå (16é² 07) - \cx "control-x", ãã ã x ã¯ããããæå - \e ã¨ã¹ã±ã¼ã (16é² 1B) - \f æ¹ãã¼ã¸ (16é² 0C) - \n æ¹è¡ (16é² 0A) - \r 復帰 (16é² 0D) - \t ã¿ã (16é² 09) - \xhh 16鲿°ã§ hh ã®æå - \ddd 8鲿°ã§ ddd ã®æåã¾ãã¯å¾æ¹åç § - - "\cx" ã®æ£ç¢ºãªå¹æã¯ã次ã®ããã«ãªãã¾ãã"x" ãå°æåã®å ´åã - 大æåã«å¤æããã¾ããç¶ãã¦ãæåã®6ãããç®(16鲿° 40)ã - å転ããã¾ããã¤ã¾ãã"\cz" ã¯16鲿°ã® 1A ã«ãªãã¾ããã"\c{" - ã¯16鲿°ã® 3B ã«ãªãã"\c;" 㯠16鲿°ã® 7B ã«ãªãã¾ãã - - "\x" ã®å¾ã§ã¯ã2æ¡ã®16鲿°ãèªã¾ãã¾ãã(表ãæåã¯ã大æåã§ã - å°æåã§ãå¯ã§ã) - - "\0" ã§ã¯2æ¡ã¾ã§ã®8鲿°ãèªã¿ãã¾ãã¾ãã - 両æ¹ã®ã±ã¼ã¹ã¨ãã2æ¡ããå°ãªãå ´åã表ãã¦ããæåèªä½ã - 使ç¨ããã¾ããã¤ã¾ãã"\0\x\07" ã¯2ã¤ã®ãã«æåã®å¾ã«ãã«æå - ãç¶ãããã®ã表ãã¾ãã8鲿°ã表ãæåã«ã¤ãã¦ã¯ãæåã®ã¼ã - ã®å¾ã«2æ¡ã®æ°åãæå®ããããã«æ³¨æãã¦ä¸ããã - - ããã¯ã¹ã©ãã·ã¥ã®å¾ã«0以å¤ã®æ°åãç¶ãå ´åã®å¦çã¯ãè¤éã§ãã - æåã¯ã©ã¹ã®å¤ã§ã¯ãPCRE ã¯ç¶ãæ¡ã10鲿°ã¨ãã¦èªã¿ãã¿ã¾ãã - æ°åã10ãããå°ããå ´åãã¾ãã¯ãå¼ã®ä¸ã«å¤ãåå¾ããå·¦æ¬å¼§ã - ãã®æ°ä»¥ä¸ãã£ãå ´åãå ¨ä½ã®ã·ã¼ã±ã³ã¹ã¯ã<emphasis>徿¹</emphasis> - <emphasis>åç §</emphasis>ã¨ãã¦è§£éããã¾ãããã®åä½ã«é¢ãã説æ - ã¯ãæ¬å¼§ä»ãã®ãµããã¿ã¼ã³ã®èª¬æã®å¾ã«è¡ãã¾ãã - - æåã¯ã©ã¹ã®ä¸ã¾ãã¯10鲿°ã9ãã大ãããåå¾ãè¡ã£ããµããã¿ã¼ã³ - ããã®æ°ã«æºããªãå ´åãPCRE ã¯ããã¯ã¹ã©ãã·ã¥ã®å¾ããæå¤§3æåã®8鲿° - ãå度èªã¿ãã¿ããã®å¤ã®æä¸ä½ 8ããããã1ãã¤ããçæãã¾ãã - ç¶ãæ¡ã¯ããèªä½ã表ãã¾ããä¾ãã°ã - - \040 ã¯ç©ºç½ã®å¥ã®è¡¨è¨æ³ã§ã - \40 ã¯ãåãæå³ã§ãããã ããå¤ãå徿¸ã¿ã®ãµããã¿ã¼ã³ã - 40åæªæºã®å ´å - \7 ã¯å¸¸ã«å¾æ¹åç §ã§ã - \11 ã¯å¾æ¹åç §ã¾ãã¯ã¿ãã®å¥ã®è¡¨è¨æ³ã§ã - \011 ã¯å¸¸ã«ã¿ãã§ã - \0113 ã¯ã¿ãã®å¾ã«æå "3" ãç¶ãããã®ã§ã - \113 (99 ãè¶ ãã徿¹åç §ã¯ãªãã®ã§) 8鲿° 113 ã表ãæå - \377 ã¯1ãããã®ä¸¦ã³ã§æ§æããã1ãã¤ãã§ã - \81 ã¯å¾æ¹åç §ã¾ãã¯ããã«æåã®å¾ã«2ã¤ã®æå "8" ããã³ "1" ã - ç¶ãããã®ã§ãã - + å ´åã(æåã¯ã©ã¹ã®ä¸ã§ãªã)ãã¿ã¼ã³å ã®ç©ºç½æåããã³ + "#" ã¨æ¬¡ã®æ¹è¡æåã®éã®æåã¯ç¡è¦ããã¾ãã + ç©ºç½æåã¾ã㯠"#" ããã¿ã¼ã³ã®ä¸é¨ã¨ãã¦å«ããéã«ã¯ã + ããã¯ã¹ã©ãã·ã¥ã«ããã¨ã¹ã±ã¼ããããã¨ãã§ãã¾ãã + </para> + <para> + ããã¯ã¹ã©ãã·ã¥ã®2çªç®ã®ä½¿ç¨æ³ã¯ãåºåãããªãæåã + ãã¿ã¼ã³å ã«ç®ã«è¦ããå½¢ã§ã¨ã³ã³ã¼ãããææ³ãæä¾ãããã®ã§ãã + ãã¿ã¼ã³ãçµäºããããã«æåãé¤ããåºåãããªãæåã®è¦ãæ¹ã« + ã¯ä½ã®å¶ç´ãããã¾ãããããã¿ã¼ã³ãããã¹ãç·¨éããéã«ã¯ãé常 + 次ã®ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ãç¨ããæ¹ããå ã®ãã¤ããªæåããã + ããç°¡åã§ãããã + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\a</emphasis></term> + <listitem> + <simpara> + ã¢ã©ã¼ã ããã«æå (16é² 07) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\cx</emphasis></term> + <listitem> + <simpara> + "control-x", ãã ã x ã¯ããããæå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\e</emphasis></term> + <listitem> + <simpara> + ã¨ã¹ã±ã¼ã (16é² 1B) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\f</emphasis></term> + <listitem> + <simpara> + æ¹ãã¼ã¸ (16é² 0C) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\n</emphasis></term> + <listitem> + <simpara> + æ¹è¡ (16é² 0A) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\r</emphasis></term> + <listitem> + <simpara> + 復帰 (16é² 0D) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\t</emphasis></term> + <listitem> + <simpara> + ã¿ã (16é² 09) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\xhh</emphasis></term> + <listitem> + <simpara> + 16鲿°ã§ hh ã®æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\ddd</emphasis></term> + <listitem> + <simpara> + 8鲿°ã§ ddd ã®æåã¾ãã¯å¾æ¹åç § + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + "\cx" ã®æ£ç¢ºãªå¹æã¯ã次ã®ããã«ãªãã¾ãã"x" ãå°æåã®å ´åã + 大æåã«å¤æããã¾ããç¶ãã¦ãæåã®6ãããç®(16鲿° 40)ã + å転ããã¾ããã¤ã¾ãã"\cz" ã¯16鲿°ã® 1A ã«ãªãã¾ããã"\c{" + ã¯16鲿°ã® 3B ã«ãªãã"\c;" 㯠16鲿°ã® 7B ã«ãªãã¾ãã + </para> + <para> + "\x" ã®å¾ã§ã¯ã2æ¡ã®16鲿°ãèªã¾ãã¾ãã(表ãæåã¯ã大æåã§ã + å°æåã§ãå¯ã§ã)"\0"ã§ã¯2æ¡ã¾ã§ã®8鲿°ãèªã¿ãã¾ãã¾ãã + 両æ¹ã®ã±ã¼ã¹ã¨ãã2æ¡ããå°ãªãå ´åã表ãã¦ããæåèªä½ã + 使ç¨ããã¾ããã¤ã¾ãã"\0\x\07" ã¯2ã¤ã®ãã«æåã®å¾ã«ãã«æå + ãç¶ãããã®ã表ãã¾ãã8鲿°ã表ãæåã«ã¤ãã¦ã¯ãæåã®ã¼ã + ã®å¾ã«2æ¡ã®æ°åãæå®ããããã«æ³¨æãã¦ä¸ããã + </para> + <para> + ããã¯ã¹ã©ãã·ã¥ã®å¾ã«0以å¤ã®æ°åãç¶ãå ´åã®å¦çã¯ãè¤éã§ãã + æåã¯ã©ã¹ã®å¤ã§ã¯ãPCRE ã¯ç¶ãæ¡ã10鲿°ã¨ãã¦èªã¿ãã¿ã¾ãã + æ°åã10ãããå°ããå ´åãã¾ãã¯ãå¼ã®ä¸ã«å¤ãåå¾ããå·¦æ¬å¼§ã + ãã®æ°ä»¥ä¸ãã£ãå ´åãå ¨ä½ã®ã·ã¼ã±ã³ã¹ã¯ã<emphasis>徿¹</emphasis> + <emphasis>åç §</emphasis>ã¨ãã¦è§£éããã¾ãããã®åä½ã«é¢ãã説æ + ã¯ãæ¬å¼§ä»ãã®ãµããã¿ã¼ã³ã®èª¬æã®å¾ã«è¡ãã¾ãã + </para> + <para> + æåã¯ã©ã¹ã®ä¸ã¾ãã¯10鲿°ã9ãã大ãããåå¾ãè¡ã£ããµããã¿ã¼ã³ + ããã®æ°ã«æºããªãå ´åãPCRE ã¯ããã¯ã¹ã©ãã·ã¥ã®å¾ããæå¤§3æåã®8鲿° + ãå度èªã¿ãã¿ããã®å¤ã®æä¸ä½ 8ããããã1ãã¤ããçæãã¾ãã + ç¶ãæ¡ã¯ããèªä½ã表ãã¾ããä¾ãã°ã + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\040</emphasis></term> + <listitem> + <simpara> + ã¯ç©ºç½ã®å¥ã®è¡¨è¨æ³ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\40</emphasis></term> + <listitem> + <simpara> + ã¯ãåãæå³ã§ãããã ããå¤ãå徿¸ã¿ã®ãµããã¿ã¼ã³ã40åæª + æºã®å ´åã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\7</emphasis></term> + <listitem> + <simpara> + ã¯å¸¸ã«å¾æ¹åç §ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\11</emphasis></term> + <listitem> + <simpara> + ã¯å¾æ¹åç §ã¾ãã¯ã¿ãã®å¥ã®è¡¨è¨æ³ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\011</emphasis></term> + <listitem> + <simpara> + ã¯å¸¸ã«ã¿ãã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\0113</emphasis></term> + <listitem> + <simpara> + ã¯ã¿ãã®å¾ã«æå "3" ãç¶ãããã®ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\113</emphasis></term> + <listitem> + <simpara> + (99 ãè¶ ãã徿¹åç §ã¯ãªãã®ã§) 8鲿° 113 ã表ãæåã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\377</emphasis></term> + <listitem> + <simpara> + ã¯1ãããã®ä¸¦ã³ã§æ§æããã1ãã¤ãã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\81</emphasis></term> + <listitem> + <simpara> + ã¯å¾æ¹åç §ã¾ãã¯ããã«æåã®å¾ã«2ã¤ã®æå "8" ããã³ "1" ã + ç¶ãããã®ã§ãã + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> 3æ¡ãè¶ ãã¦8鲿°ã¯èªã¿ãã¾ããªããããå¤ã100以ä¸ã®8鲿°ã«ã¯ ã¼ããåã«ã¤ããã¹ãã§ã¯ãªããã¨ã«æ³¨æãã¦ãã ããã - + </para> + <para> 1ãã¤ãã®å¤ãå®ç¾©ããããããã·ã¼ã±ã³ã¹ã¯ãæåã¯ã©ã¹ã®å é¨ ããã³å¤é¨ã§ä½¿ç¨å¯è½ã§ããå ãã¦ãæåã¯ã©ã¹ã®å é¨ã§ã¯ã·ã¼ã±ã³ã¹ "\b" ã¯ããã¯ã¹ãã¼ã¹(16é² 0x)ã¨ãã¦è§£éããã¾ãã æåã¯ã©ã¹ã®å¤ã§ã¯ãå¥ã®æå³ãæãã¾ãã(以ä¸ãåç §ä¸ãã) - + </para> + <para> ããã¯ã¹ã©ãã·ã¥ã®ç¬¬3ã®ä½¿ç¨æ³ã¯ãå æ¬çãªæååãæå®ããç¨é ã§ãã - - \d 10鲿°å - \D 10鲿°åã§ãªãå ¨ã¦ã®æå - \s ç©ºç½æå - \S ç©ºç½æå以å¤ã®æå - \w åèªæ§ææå - \W åèªæ§ææåä»¥å¤ - - ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã®åçµã¯ãå ¨æåã®éåã2ã¤ã®éåã« - åå²ãã¾ããå ¨ã¦ã®æåã¯ãåçµã®ãã¡ãçæ¹ã ?kããããã¾ãã - - åèªæ§ææåã¨ã¯è±åã¾ãã¯æ°åã¾ãã¯ã¢ã³ãã¼ã¹ã³ã¢æåã§ããã - Perl ã® "åèª" ã¨æãå¾ãæåã®ãã¨ã§ãã - æåããã³æ°åã®å®ç¾©ã¯ãPCRE ã®æåãã¼ãã«ã«ããå¶å¾¡ããã - ãã±ã¼ã«ãæå®ããããããè¡ã£ãå ´åã«ã¯å¤ããå¯è½æ§ãããã¾ãã - ("ãã±ã¼ã«ã®ãµãã¼ã"ãåç §ä¸ãã) - ä¾ãã°ã"fr" (ãã©ã³ã¹èª)ãã±ã¼ã«ã®å ´åãããã¤ãã®128ãè¶ ãã - æåã³ã¼ãã®æåã¯ãã¢ã¯ã»ã³ãä»ãã®æåã«ä½¿ç¨ããã¦ããã - ããã㯠\w ã«ããããã¾ãã - + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\d</emphasis></term> + <listitem> + <simpara> + 10鲿°å + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\D</emphasis></term> + <listitem> + <simpara> + 10鲿°åã§ãªãå ¨ã¦ã®æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\s</emphasis></term> + <listitem> + <simpara> + ç©ºç½æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\S</emphasis></term> + <listitem> + <simpara> + ç©ºç½æå以å¤ã®æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\w</emphasis></term> + <listitem> + <simpara> + åèªæ§ææå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\W</emphasis></term> + <listitem> + <simpara> + åèªæ§ææåä»¥å¤ + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã®åçµã¯ãå ¨æåã®éåã2ã¤ã®éåã« + åå²ãã¾ããå ¨ã¦ã®æåã¯ãåçµã®ãã¡ãçæ¹ã ?kããããã¾ãã + </para> + <para> + åèªæ§ææåã¨ã¯è±åã¾ãã¯æ°åã¾ãã¯ã¢ã³ãã¼ã¹ã³ã¢æåã§ããã + Perl ã® "åèª" ã¨æãå¾ãæåã®ãã¨ã§ãã + æåããã³æ°åã®å®ç¾©ã¯ãPCRE ã®æåãã¼ãã«ã«ããå¶å¾¡ããã + ãã±ã¼ã«ãæå®ããããããè¡ã£ãå ´åã«ã¯å¤ããå¯è½æ§ãããã¾ãã + ("ãã±ã¼ã«ã®ãµãã¼ã"ãåç §ä¸ãã) + ä¾ãã°ã"fr" (ãã©ã³ã¹èª)ãã±ã¼ã«ã®å ´åãããã¤ãã®128ãè¶ ãã + æåã³ã¼ãã®æåã¯ãã¢ã¯ã»ã³ãä»ãã®æåã«ä½¿ç¨ããã¦ããã + ããã㯠\w ã«ããããã¾ãã + </para> + <para> ãããã®æååã·ã¼ã±ã³ã¹ã¯ãæåã¯ã©ã¹ã®å å¤ã«ããã使ç¨å¯è½ ã§ãããããã¯ãé©å½ãªåã®1æåã«ããããã¾ããç¾å¨ãããã³ã° ãè¡ã£ã¦ããä½ç½®ãæ¤ç´¢å¯¾è±¡æååã®çµç«¯ã§ããå ´åããããã§ãã æåã¯ãªãã®ã§å ¨ã¦ã®ãããã³ã°ã¯å¤±æãã¾ãã - + </para> + <para> ããã¯ã¹ã©ãã·ã¥ã®ç¬¬4ã®ä½¿ç¨æ³ã¯ãåç´ãªè¨æã§ãã è¨æã¯ãæ¤ç´¢å¯¾è±¡æååããæåãå ¨ãæãåºããã« ããããç¹å®ã®ä½ç½®ã§çããã¨ããæææ¡ä»¶ãæå®ãã¾ãã ããè¤éãªè¨æã«é¢ãããµããã¿ã¼ã³ã®ä½¿ç¨æ³ã以ä¸ã«èª¬æãã¾ãã ããã¯ã¹ã©ãã·ã¥ä»ãã®è¨æã¯æ¬¡ã®ãã®ãããã¾ãã - - \b åèªã®å¢ç - \B åèªã®å¢çã§ãªã - \A æ¤ç´¢å¯¾è±¡ã®å§ã¾ã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) - \Z æ¤ç´¢å¯¾è±¡ã®çµããã¾ãã¯çµç«¯ã®æ¹è¡ (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) - \z æ¤ç´¢å¯¾è±¡ã®çµãã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) - - ãããã®è¨æã¯ãæåã¯ã©ã¹ã«ã¯ä½¿ç¨ã§ãã¾ããã(ããããæåã¯ã©ã¹ã® - ä¸ã§ã¯ã"\b" ã«ã¯å¥ã®æå³ãã¤ã¾ããããã¯ã¹ãã¼ã¹æåã¨ããæå³ã - ãããã¨ã«æ³¨æãã¦ãã ãã) - - åèªã®å¢çã¯ãæ¤ç´¢å¯¾è±¡æååã«ããã¦ãç¾å¨ã®æåããã³åã®æåã - 両æ¹ã¯ \w ã¾ã㯠\W ã«ãããããªã - (ããªãã¡ãçæ¹ã¯ \w ã«ããããã¦ãããçæ¹ã¯\W ã«ããããã)ãã - ã¾ãã¯ãæåã®ã¾ãã¯æå¾ã®æåã \w ã«ããããããªãã°ã - ãããããæååã®å§ãã¾ãã¯çµããã®ä½ç½®ã§ãã - - è¨æ \A, \A, \z ã¯ã(以ä¸ã«èª¬æãã)ã©ããªãªãã·ã§ã³ãè¨å®ãã¦ã - æååã®å§ç«¯ããã³çµç«¯ã«ã®ã¿ããããããããè¨å·ããã³ãã«è¨å· - ã¨ã¯ç°ãªã£ã¦ãã¾ãã - ãããã®è¨æã¯ãPCRE_NOTBOL ã¾ã㯠PCRE_NOTEOL ãªãã·ã§ã³ã®å½±é¿ã - åãã¾ããã\Z åã³ \z ã®éãã¯ã\Z ã¯ãæååã®çµç«¯ã¨åæã« - æååã®æå¾ã®æåãæ¹è¡ã®å ´åã«åã®æåã«ãã£Ãããã®ã«å¯¾ãã - \z ã¯çµç«¯ã«ã®ã¿ããããã¾ãã - </literallayout> + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\b</emphasis></term> + <listitem> + <simpara> + åèªã®å¢ç + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\B</emphasis></term> + <listitem> + <simpara> + åèªã®å¢çã§ãªã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\A</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡ã®å§ã¾ã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\Z</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡ã®çµããã¾ãã¯çµç«¯ã®æ¹è¡ (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\z</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡ã®çµãã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + ãããã®è¨æã¯ãæåã¯ã©ã¹ã«ã¯ä½¿ç¨ã§ãã¾ããã(ããããæåã¯ã©ã¹ã® + ä¸ã§ã¯ã"<literal>\b</literal>" ã«ã¯å¥ã®æå³ãã¤ã¾ããããã¯ã¹ãã¼ + ã¹æåã¨ããæå³ããããã¨ã«æ³¨æãã¦ãã ãã) + </para> + <para> + åèªã®å¢çã¯ãæ¤ç´¢å¯¾è±¡æååã«ããã¦ãç¾å¨ã®æåããã³åã®æåã + 両æ¹ã¯<literal>\w</literal>ã¾ãã¯<literal>\W</literal>ã«ãããã + ãªã(ããªãã¡ãçæ¹ã¯<literal>\w</literal>ã«ããããã¦ãããçæ¹ + ã¯<literal>\W</literal>ã«ããããã)ããã¾ãã¯ãæåã®ã¾ãã¯æå¾ + ã®æåã<literal>\w</literal>ã«ããããããªãã°ããããããæå + åã®å§ãã¾ãã¯çµããã®ä½ç½®ã§ãã + </para> + <para> + è¨æ<literal>\A</literal>, <literal>\Z</literal>, + <literal>\z</literal>ã¯ã(以ä¸ã«èª¬æãã)ã©ããªãªãã·ã§ã³ãè¨å® + ãã¦ãæååã®å§ç«¯ããã³çµç«¯ã«ã®ã¿ããããããããè¨å·ããã³ãã« + è¨å·ã¨ã¯ç°ãªã£ã¦ãã¾ãã + ãããã®è¨æã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_NOTBOL</link>ã¾ãã¯<link + linkend="pcre.pattern.modifiers">PCRE_NOTEOL</link>ãªãã·ã§ã³ã® + å½±é¿ãåãã¾ããã<literal>\Z</literal>åã³<literal>\z</literal> + ã®éãã¯ã<literal>\Z</literal>ã¯ãæååã®çµç«¯ã¨åæã«æååã® + æå¾ã®æåãæ¹è¡ã®å ´åã«åã®æåã«ãããããã®ã«å¯¾ãã + <literal>\z</literal>ã¯çµç«¯ã«ã®ã¿ããããã¾ãã + </para> </refsect2> <refsect2 id="regexp.reference.circudollar"> @@ -1187,124 +1643,134 @@ ãå¿ è¦ã¯ããã¾ãããã使ç¨ã??æã®æå¾ã®ã¢ã¤ãã ã§ããå¿ è¦ ãããã¾ãããã«è¨å·ã¯ãæåã¯ã©ã¹ã®ä¸ã§ã¯ç¹å¥ãªæå³ãæãã¾ ããã - - ãã«è¨å·ã®æå³ã¯ãã³ã³ãã¤ã«æã¾ãã¯ãããã³ã°æã® - PCRE_DOLLAR_ENDONLY ãªãã·ã§ã³ã®è¨å®ã«ãã - æååã®çµç«¯ã«ã®ã¿ãããããããã«å¤æ´ãããã¨ãå¯è½ã§ãã - ãã®ãã£ã¦ãã¯ã\Z è¨æã«ã¯å½±é¿ãä¸ãã¾ããã - - ãããè¨å·ã¨ãã«è¨å·ã®æå³ã¯ãPCRE_MULTILINE ãªãã·ã§ã³ãè¨å® - ããå ´åã«å¤åãã¾ãããããè¨å®ããå ´åã対象æååã®å§ç«¯åã³ - çµç«¯ã«ãããããã®ã«å ãã¦ãæååå é¨ã® "\n" æåã®ç´å - åã³ç´å¾ã«ããããããããã¾ããä¾ãã°ããã¿ã¼ã³ /^abc$/ 㯠- è¤æ°è¡ã¢ã¼ãã§ã¯å¯¾è±¡æåå "def\nabc" ã«ããããã¾ããã - ããã§ãªãå ´åã¯ããããã¾ãããçµæã¨ãã¦ã - å ¨ã¦ã®æã "^" ã§å§ã¾ããããåä¸è¡ã¢ã¼ãã§ã¢ã³ã«ã¼ä»ãã®ãã¿ - ã¼ã³ã¯ãè¤æ°è¡ã¢ã¼ãã§ã¯ã¢ã³ã«ã¼ç¡ãã¨ãªãã¾ãã - PCRE_DOLLAR_ENDONLY ãªãã·ã§ã³ã¯ãPCRE_MULTILINE ãè¨å®ããã¦ãã - å ´åã¯ç¡è¦ããã¾ãã - - 両æ¹ã®ã¢ã¼ãã§å¯¾è±¡ã®å§ç«¯ããã³çµç«¯ã«ããããããããã« - ã·ã¼ã±ã³ã¹ \A, \Z, \z ã使ç¨åºæ¥ããã¨ã«æ³¨æãã¦ãã ããã - ãã¿ã¼ã³ã®æã \A ãä»ãã¦å§ã¾ãå ´åã - PCRE_MULTILINE ã®è¨å®ã«ãããã常ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã + + ãã«è¨å·ã®æå³ã¯ãã³ã³ãã¤ã«æã¾ãã¯ãããã³ã°æã® + <link linkend="pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLY</link> + ãªãã·ã§ã³ã®è¨å®ã«ããæååã®çµç«¯ã«ã®ã¿ãããããããã«å¤æ´ãã + ãã¨ãå¯è½ã§ãããã®è¨å®ã¯ã\Z è¨æã«ã¯å½±é¿ãä¸ãã¾ããã + + ãããè¨å·ã¨ãã«è¨å·ã®æå³ã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãªãã·ã§ã³ + ãè¨å®ããå ´åã«å¤åãã¾ãããããè¨å®ããå ´åã対象æååã®å§ç«¯ + åã³çµç«¯ã«ãããããã®ã«å ãã¦ãæååå é¨ã® "\n" æåã®ç´å + åã³ç´å¾ã«ããããããããã¾ããä¾ãã°ããã¿ã¼ã³ /^abc$/ 㯠+ è¤æ°è¡ã¢ã¼ãã§ã¯å¯¾è±¡æåå "def\nabc" ã«ããããã¾ããã + ããã§ãªãå ´åã¯ããããã¾ãããçµæã¨ãã¦ã + å ¨ã¦ã®æã "^" ã§å§ã¾ããããåä¸è¡ã¢ã¼ãã§ã¢ã³ã«ã¼ä»ãã®ãã¿ + ã¼ã³ã¯ãè¤æ°è¡ã¢ã¼ãã§ã¯ã¢ã³ã«ã¼ç¡ãã¨ãªãã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLY</link> + ãªãã·ã§ã³ã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãè¨å®ãã + ã¦ããå ´åã¯ç¡è¦ããã¾ãã + + 両æ¹ã®ã¢ã¼ãã§å¯¾è±¡ã®å§ç«¯ããã³çµç«¯ã«ããããããããã« + ã·ã¼ã±ã³ã¹ \A, \Z, \z ã使ç¨åºæ¥ããã¨ã«æ³¨æãã¦ãã ããã + ãã¿ã¼ã³ã®æã \A ãä»ãã¦å§ã¾ãå ´åã + <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ã®è¨ + å®ã«ãããã常ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã </literallayout> </refsect2> - <refsect2 id="regexp.reference.dot"> - <title>çµæ¢ç¬¦</title> + + <refsect2 id="regexp.reference.dot"> + <title>çµæ¢ç¬¦</title> <literallayout> - æåã¯ã©ã¹ã®å¤å´ã§ã¯ããã¿ã¼ã³ã®ä¸ã®ãããã¯éåºåæåãå«ã - (ããã©ã«ãã§ã¯)æ¹è¡ä»¥å¤ã®å¯¾è±¡ã®å ¨ã¦ã®1æåã«ããããã¾ãã - PCRE_DOTALL ãªãã·ã§ã³ãè¨å®ããå ´åããããã¯æ¹è¡ã«ãããã - ãã¾ãããããã®å¦çã¯ããããè¨å·ããã³ãã«è¨å·ã¨ã¯å®å ¨ã«ç¬ç«ã - ã¦ãã¾ããå ±éãªç¹ã¯å ±ã«æ¹è¡æåãå«ããã¨ã ãã§ãã - ãããã¯ãæåã¯ã©ã¹ã®ä¸ã§ã¯ç¹å¥ãªæå³ãæã¡ã¾ããã + æåã¯ã©ã¹ã®å¤å´ã§ã¯ããã¿ã¼ã³ã®ä¸ã®ãããã¯éåºåæåãå«ã + (ããã©ã«ãã§ã¯)æ¹è¡ä»¥å¤ã®å¯¾è±¡ã®å ¨ã¦ã®1æåã«ããããã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãªãã·ã§ + ã³ãè¨å®ããå ´åããããã¯æ¹è¡ã«ãããããã¾ãããããã®å¦çã¯ã + ãããè¨å·ããã³ãã«è¨å·ã¨ã¯å®å ¨ã«ç¬ç«ãã¦ãã¾ããå ±éãªç¹ã¯å ±ã« + æ¹è¡æåãå«ããã¨ã ãã§ãã + ãããã¯ãæåã¯ã©ã¹ã®ä¸ã§ã¯ç¹å¥ãªæå³ãæã¡ã¾ããã </literallayout> </refsect2> - <refsect2 id="regexp.reference.squarebrackets"> - <title>è§æ¬å¼§</title> - <literallayout> - å·¦ãã©ã±ããã¯æåã¯ã©ã¹ã®éå§ã表ããå³ãã©ã±ããã«ããçµäº - ãã¾ããå³ãã©ã±ããã¯ãããèªä½ç¹å¥ãªãã®ã§ã¯ããã¾ããã - å³ãã©ã±ãããã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã(ãããã㪠- ãã°ãæåã«ãããè¨å·ãæã£ã¦ããå¾ã§)ã¯ã©ã¹ã®æåã®æåã - ã¼?gããããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå¿ è¦ãããã¾ãã - - æåã¯ã©ã¹ã¯ã対象ã®1æåã«ããããã¾ãããã®æåã¯ã¯ã©ã¹ã«ãã - å®ç¾©ãããæåéåã®ä¸ã«ããå¿ è¦ãããã¾ãããã ãã - ã¯ã©ã¹ã®æåã®æåããããè¨å·ã®å ´åã¯ã対象æåã¯æ®ããã«ãã - å®ç¾©ãããéåã®ã課å ãã£ã¦ã¯ãªãã¾ããã - ãããè¨å·ãã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã¯ãå¿ ããæåã® - æåã¨ããªãããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã«ãã¦ä¸ - ããã - ä¾ãã°ãæåã¯ã©ã¹ [aeiou] ã¯å°æåã®æ¯é³ã«ããããã¾ããã - [^aeiou] ã¯å°æåã®æ¯é³ä»¥å¤ã®æåã«ããããã¾ãã - ãããè¨å·ã¯ãåå¨ããªããã®ãåæãããã¨ã«ããã¯ã©ã¹ã«ãã - æåãæå®ãã便å©ãªè¡¨è¨ã§ãã - ãããè¨å·ã¯ãè¨æã§ã¯ããã¾ããã対象æååããæåãæ¶è²»ãã - ç¾å¨ã®ãã¤ã³ã¿ãæååã®çµç«¯ã«ããå ´åã«ã¯å¤±æãã¾ãã - - 大æåå°æåãåºå¥ããªãããããè¡ãããå ´åãã¯ã©ã¹ã®æå㯠- 大æåã»å°æåã®ä¸¡æ¹ã表ãã¾ããããã¯ãä¾ãã°ã大æåå°æå - ãåºå¥ããªãå ´åã®ããã [aeiou] 㯠"a" ã¨åæ§ã« "A" ã«ããã - ããæåå°æåãåºå¥ããªãå ´åã®ããã [^aeiou] 㯠"A" ã«ãã - ããã¾ããã䏿¹ã大æåå°æåãåºå¥ããå ´åã¯ããããã¾ãã - - PCRE_DOTALL ã¾ã㯠PCRE_MULTILINE ãªãã·ã§ã³ãã©ã®ããã«è¨å® - ãããã¨ãæ¹è¡æåã¯ãæåã¯ã©ã¹ã«ããã¦ç¹å¥ãªæ¹æ³ã§å¦çãã - ã¾ããã[^a] ã®ãããªã¯ã©ã¹ã¯å¸¸ã«æ¹è¡ã«ããããã¾ãã - - ãã¤ãã¹ (ãã¤ãã³)æåã¯æåã¯ã©ã¹ã®ä¸ã§æåã®ç¯å²ãæå®ãã - ããã«ä½¿ç¨ããã¾ããä¾ãã°ã[d-m] 㯠d 㨠m ã®éã®ãããã - æåã«ããããã¾ããéã«ãã¹æåãã¯ã©ã¹ã®ä¸ã«å¿ è¦ãªå ´åã¯ã - ããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã¯ã©ã¹ã®æåã¾ãã¯æå¾ã® - ãããªç¯å²ã示ãã¨ã¯è§£éãããªãå ´æã«ä½¿ç¨ãã¦ä¸ããã - æåãªãã©ã« "]" ãç¯å²ã®æå¾ã®æåã¨ãã¦ä½¿ç¨ãããã¨ã¯ã§ãã¾ - ããã[W-]46] ã®ãããªãã¿ã¼ã³ã¯ã2ã¤æåã®ã¯ã©ã¹("W" ããã³ + <refsect2 id="regexp.reference.squarebrackets"> + <title>è§æ¬å¼§</title> + <literallayout> + å·¦ãã©ã±ããã¯æåã¯ã©ã¹ã®éå§ã表ããå³ãã©ã±ããã«ããçµäº + ãã¾ããå³ãã©ã±ããã¯ãããèªä½ç¹å¥ãªãã®ã§ã¯ããã¾ããã + å³ãã©ã±ãããã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã(ãããã㪠+ ãã°ãæåã«ãããè¨å·ãæã£ã¦ããå¾ã§)ã¯ã©ã¹ã®æåã®æåãã¼ã¿ + ãããããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå¿ è¦ãããã¾ãã + + æåã¯ã©ã¹ã¯ã対象ã®1æåã«ããããã¾ãããã®æåã¯ã¯ã©ã¹ã«ãã + å®ç¾©ãããæåéåã®ä¸ã«ããå¿ è¦ãããã¾ãããã ãã + ã¯ã©ã¹ã®æåã®æåããããè¨å·ã®å ´åã¯ã対象æåã¯æ®ããã«ãã + å®ç¾©ãããéåã®ã課å ãã£ã¦ã¯ãªãã¾ããã + ãããè¨å·ãã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã¯ãå¿ ããæåã® + æåã¨ããªãããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã«ãã¦ä¸ + ããã + + ä¾ãã°ãæåã¯ã©ã¹ [aeiou] ã¯å°æåã®æ¯é³ã«ããããã¾ããã + [^aeiou] ã¯å°æåã®æ¯é³ä»¥å¤ã®æåã«ããããã¾ãã + ãããè¨å·ã¯ãåå¨ããªããã®ãåæãããã¨ã«ããã¯ã©ã¹ã«ãã + æåãæå®ãã便å©ãªè¡¨è¨ã§ãã + ãããè¨å·ã¯ãè¨æã§ã¯ããã¾ããã対象æååããæåãæ¶è²»ãã + ç¾å¨ã®ãã¤ã³ã¿ãæååã®çµç«¯ã«ããå ´åã«ã¯å¤±æãã¾ãã + + 大æåå°æåãåºå¥ããªãããããè¡ãããå ´åãã¯ã©ã¹ã®æå㯠+ 大æåã»å°æåã®ä¸¡æ¹ã表ãã¾ããããã¯ãä¾ãã°ã大æåå°æå + ãåºå¥ããªãå ´åã®ããã [aeiou] 㯠"a" ã¨åæ§ã« "A" ã«ããã + ããæåå°æåãåºå¥ããªãå ´åã®ããã [^aeiou] 㯠"A" ã«ãã + ããã¾ããã䏿¹ã大æåå°æåãåºå¥ããå ´åã¯ããããã¾ãã + + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ã¾ã㯠+ <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãªã + ã·ã§ã³ãã©ã®ããã«è¨å®ãããã¨ãæ¹è¡æåã¯ãæåã¯ã©ã¹ã«ããã¦ç¹ + å¥ãªæ¹æ³ã§å¦çããã¾ããã[^a] ã®ãããªã¯ã©ã¹ã¯å¸¸ã«æ¹è¡ã«ããã + ãã¾ãã + + ãã¤ãã¹ (ãã¤ãã³)æåã¯æåã¯ã©ã¹ã®ä¸ã§æåã®ç¯å²ãæå®ãã + ããã«ä½¿ç¨ããã¾ããä¾ãã°ã[d-m] 㯠d 㨠m ã®éã®ãããã + æåã«ããããã¾ããéã«ãã¹æåãã¯ã©ã¹ã®ä¸ã«å¿ è¦ãªå ´åã¯ã + ããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã¯ã©ã¹ã®æåã¾ãã¯æå¾ã® + ãããªç¯å²ã示ãã¨ã¯è§£éãããªãå ´æã«ä½¿ç¨ãã¦ä¸ããã + æåãªãã©ã« "]" ãç¯å²ã®æå¾ã®æåã¨ãã¦ä½¿ç¨ãããã¨ã¯ã§ãã¾ + ããã[W-]46] ã®ãããªãã¿ã¼ã³ã¯ã2ã¤æåã®ã¯ã©ã¹("W" ããã³ "-")ã®å¾ã«ãªãã©ã«æåå "46]" ãç¶ãã¦ããã¯ã©ã¹ã¨ãã¦è§£é - ããã"W46]"ã¾ã㯠"-46]" ã«ããããã¾ããããããç¯å²ã®çµç«¯ - ã¨ãã¦è§£éããã "]" ãããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå ´åã - [W-\]46] ã¯ç¯å²ã®å¾ã«2ã¤ã®æåãç¶ãä¸ã¤ã®ã¯ã©ã¹ã¨ãã¦è§£éã - ãã¾ãã"]" ã®8é²ãããã¯16é²è¡¨ç¾ãç¯å²ã®çµç«¯ã¨ãã¦ä½¿ç¨å¯è½ - ã§ãã - - ç¯å²æå®ã§ã¯ãASCII ç §åå¦çãè¡ãã¾ããç¯å²ã§ã¯ã[\000-\037] - ã®ããã«æ°å¤çã«æå®ããæåã使ç¨å¯è½ã§ããæåãå«ãç¯å²ã - 大æåå°æåãåºå¥ããªãããããè¨å®ããã¦ããã¨ãã«ä½¿ç¨ããã - å ´åã大æåå°æåã®ä¸¡æ¹ã«ããããã¾ããä¾ãã°ã[W-c] ã¯ã - [][\^_`wxyzabc] ã«ç価ã§ããã大æåå°æåã«é¢ä¿ãªããããã - ã¾ããæåãã¼ãã«ã§ "fr" ãã±ã¼ã«ã使ç¨ãã¦ããå ´åã - [\xc8-\xcb] ã¯ã大æåå°æåã®åºå¥ç¡ãã¢ã¯ã»ã³ãä»ãã® E ã« - ããããã¾ãã - - æåå \d, \D, \s, \S, \w, \W ã¯æåã¯ã©ã¹ã®ä¸ã§ãæå®å¯è½ - ã§ãããã¯ã©ã¹ã«ãããããæåã追å ãã¾ããä¾ãã°ã[\dABCDEF] - ã¯ã16鲿°ã«ããããã¾ãããããè¨å·ã¯å¤§æåã¨çµã¿åãã㦠- å°æåã«ãããã³ã°??ããç¯å²ã®çãæåéåãç°¡ä¾¿ã«æå®ãã - ãã¨ãã§ãã¾ãã - ä¾ãã°ãã¯ã©ã¹ [^\W_] ã¯æåã¾ãã¯æ°åã«ããããã¾ãããã¢ã³ã - ã¼ã¹ã³ã¢ã«ã¯ããããã¾ããã - - \, -, (å§ç«¯ã®)^ 以å¤ã®å ¨ã¦ã®è±æ°åã§ãªãæåããã³çµç«¯ã® ] ã¯ã - æåã¯ã©ã¹ã«ããã¦ç¹å¥ã§ãªãæåã§ãããã¨ã¹ã±ã¼ãããå ´åã§ã - æªå½±é¿ã¯ããã¾ããã + ããã"W46]"ã¾ã㯠"-46]" ã«ããããã¾ããããããç¯å²ã®çµç«¯ + ã¨ãã¦è§£éããã "]" ãããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå ´åã + [W-\]46] ã¯ç¯å²ã®å¾ã«2ã¤ã®æåãç¶ãä¸ã¤ã®ã¯ã©ã¹ã¨ãã¦è§£éã + ãã¾ãã"]" ã®8é²ãããã¯16é²è¡¨ç¾ãç¯å²ã®çµç«¯ã¨ãã¦ä½¿ç¨å¯è½ + ã§ãã + + ç¯å²æå®ã§ã¯ãASCII ç §åå¦çãè¡ãã¾ããç¯å²ã§ã¯ã[\000-\037] + ã®ããã«æ°å¤çã«æå®ããæåã使ç¨å¯è½ã§ããæåãå«ãç¯å²ã + 大æåå°æåãåºå¥ããªãããããè¨å®ããã¦ããã¨ãã«ä½¿ç¨ããã + å ´åã大æåå°æåã®ä¸¡æ¹ã«ããããã¾ããä¾ãã°ã[W-c] ã¯ã + [][\^_`wxyzabc] ã«ç価ã§ããã大æåå°æåã«é¢ä¿ãªããããã + ã¾ããæåãã¼ãã«ã§ "fr" ãã±ã¼ã«ã使ç¨ãã¦ããå ´åã + [\xc8-\xcb] ã¯ã大æåå°æåã®åºå¥ç¡ãã¢ã¯ã»ã³ãä»ãã® E ã« + ããããã¾ãã + + æåå \d, \D, \s, \S, \w, \W ã¯æåã¯ã©ã¹ã®ä¸ã§ãæå®å¯è½ + ã§ãããã¯ã©ã¹ã«ãããããæåã追å ãã¾ããä¾ãã°ã[\dABCDEF] + ã¯ã16鲿°ã«ããããã¾ãããããè¨å·ã¯å¤§æåã¨çµã¿åãã㦠+ å°æåã«ãããã³ã°??ããç¯å²ã®çãæåéåãç°¡ä¾¿ã«æå®ãã + ãã¨ãã§ãã¾ãã + ä¾ãã°ãã¯ã©ã¹ [^\W_] ã¯æåã¾ãã¯æ°åã«ããããã¾ãããã¢ã³ã + ã¼ã¹ã³ã¢ã«ã¯ããããã¾ããã + + \, -, (å§ç«¯ã®)^ 以å¤ã®å ¨ã¦ã®è±æ°åã§ãªãæåããã³çµç«¯ã® ] ã¯ã + æåã¯ã©ã¹ã«ããã¦ç¹å¥ã§ãªãæåã§ãããã¨ã¹ã±ã¼ãããå ´åã§ã + æªå½±é¿ã¯ããã¾ããã </literallayout> </refsect2> + <refsect2 id="regexp.reference.verticalbar"> <title>åç´ãã¼</title> <literallayout> - åç´ãã¼æåã¯ã鏿è¢ãæå®ãããã¿ã¼ã³ã§ä½¿ç¨ããã¾ããä¾ãã°ããã¿ã¼ã³ + åç´ãã¼æåã¯ã鏿è¢ãæå®ãããã¿ã¼ã³ã§ä½¿ç¨ããã¾ããä¾ãã°ããã¿ã¼ã³ gilbert|sullivan - ã¯ã"gilbert" ã¾ã㯠"sullivan" ã«ããããã¾ãã鏿è¢ã®æ°ã« - å¶éã¯ããã¾ãããã¾ãã鏿è¢ã空ã¨ãããã¨ãå¯è½ã§ã - (ç©ºã®æååã«ããããã¾ã)ããããã®éç¨ã¯ãå鏿è¢ãå·¦ãã - å³ã«éã«è¡ããæåã«æåãããã®ã使ç¨ããã¾ãã鏿è¢ã(ä»¥ä¸ - ã§èª¬æãã)ãµããã¿ã¼ã³ã®ä¸ã«ããå ´åã"æåãã"ã¨ãããã¨ã¯ - ãµããã¿ã¼ã³ã®é¸æè¢ã¨åæ§ã«ã¡ã¤ã³ãã¿ã¼ã³ã®æ®ãã®é¨åãããã - ããã¨ãããã¨ãæ?Wã¾ãã + ã¯ã"gilbert" ã¾ã㯠"sullivan" ã«ããããã¾ãã鏿è¢ã®æ°ã« + å¶éã¯ããã¾ãããã¾ãã鏿è¢ã空ã¨ãããã¨ãå¯è½ã§ã + (ç©ºã®æååã«ããããã¾ã)ããããã®éç¨ã¯ãå鏿è¢ãå·¦ãã + å³ã«éã«è¡ããæåã«æåãããã®ã使ç¨ããã¾ãã鏿è¢ã(ä»¥ä¸ + ã§èª¬æãã)ãµããã¿ã¼ã³ã®ä¸ã«ããå ´åã"æåãã"ã¨ãããã¨ã¯ + ãµããã¿ã¼ã³ã®é¸æè¢ã¨åæ§ã«ã¡ã¤ã³ãã¿ã¼ã³ã®æ®ãã®é¨åãããã + ããã¨ãããã¨ãæ?Wã¾ãã </literallayout> </refsect2> @@ -1312,103 +1778,113 @@ <title>å é¨ãªãã·ã§ã³è¨å®</title> <literallayout> - PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, PCRE_EXTENDED ã® - è¨å®ã¯ã"(?" ããã³ ")" ã§æ¬ã£ã Perl ãªãã·ã§ã³æåã«ãã - ãã¿ã¼ã³å é¨ã§å¤æ´å¯è½ã§ãã - - i PCRE_CASELESS ãæå® - m PCRE_MULTILINE ãæå® - s PCRE_DOTALL ãæå® - x PCRE_EXTENDED ãæå® - - ä¾ãã°ã(?im) ã¯å¤§æåå°æåãåºå¥ããªããè¤æ°è¡ãããã³ã°ã - æå®ãã¾ãããã¤ãã³æåãåã«ã¤ãããã¨ã«ãããã®ãªãã·ã§ã³ - ãè§£é¤ãããã¨ãå¯è½ã§ãã(?im-sx) ã®ããã«è¨å®ã¨è§£é¤ãçµã¿å - ããããã¨ãå¯è½ã§ãããã®å ´åã¯ãPCRE_CASELESS ããã³ - PCRE_MULTILINE ãè¨å®ãããPCRE_DOTALL ããã³ PCRE_EXTENDED - ãè§£é¤ããã¾ããããæåããã¤ãã³ã®åã«ãå¾ã«ãæå®ããã - å ´åããã®ãªãã·ã§ã³ã¯è§£é¤ããã¾ãã - - ãªãã·ã§ã³å¤æ´ã®é©ç¨ç¯å²ã¯è¨å®ãè¡ããããã¿ã¼ã³ã®å ´æã«ä¾å - ãã¾ãããµããã¿ã¼ã³ã®å¤å´ã§è¨å®ãããå ´åããã®å¹æã¯ããªã - ã·ã§ã³ã®è¨å®ãããã¯è§£é¤ããããã³ã°ã®æåã§è¡ãããã®ã¨åã - ã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ã¯ãå ¨ã¦å ¨ãåæ§ã«åä½ãã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_CASELESS</link> , + <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link> , + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link> , + <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ã® + è¨å®ã¯ã"(?" ããã³ ")" ã§æ¬ã£ã Perl ãªãã·ã§ã³æåã«ãã + ãã¿ã¼ã³å é¨ã§å¤æ´å¯è½ã§ãã + + i <link linkend="pcre.pattern.modifiers">PCRE_CASELESS</link>ãæå® + m <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãæå® + s <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãæå® + x <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ãæå® + + ä¾ãã°ã(?im) ã¯å¤§æåå°æåãåºå¥ããªããè¤æ°è¡ãããã³ã°ã + æå®ãã¾ãããã¤ãã³æåãåã«ã¤ãããã¨ã«ãããã®ãªãã·ã§ã³ + ãè§£é¤ãããã¨ãå¯è½ã§ãã(?im-sx) ã®ããã«è¨å®ã¨è§£é¤ãçµã¿å + ããããã¨ãå¯è½ã§ãããã®å ´åã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_CASELESS</link>ããã³<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãè¨å®ããã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ããã³ + <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link> + ãè§£é¤ããã¾ããããæåããã¤ãã³ã®åã«ãå¾ã«ãæå®ããã + å ´åããã®ãªãã·ã§ã³ã¯è§£é¤ããã¾ãã + + ãªãã·ã§ã³å¤æ´ã®é©ç¨ç¯å²ã¯è¨å®ãè¡ããããã¿ã¼ã³ã®å ´æã«ä¾å + ãã¾ãããµããã¿ã¼ã³ã®å¤å´ã§è¨å®ãããå ´åããã®å¹æã¯ããªã + ã·ã§ã³ã®è¨å®ãããã¯è§£é¤ããããã³ã°ã®æåã§è¡ãããã®ã¨åã + ã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ã¯ãå ¨ã¦å ¨ãåæ§ã«åä½ãã¾ãã (?i)abc a(?i)bc ab(?i)c abc(?i) - ã¯ã³ã³ãã¤ã«å¾ã®ãã¿ã¼ã³ã¨ãã¦ã¯ããã¿ã¼ã³ abc ã« PCRE_CASELESS - ãè¨å®ãããã®ã¨ãªãåãã«ãªãã¾ããè¨ããããã¨ããã®ãã㪠- "æä¸ä½ã®"è¨å®ã¯ã(ãµããã¿ã¼ã³å é¨ã§ä»ã®å¤æ´ãè¡ããªãéã) - ãã¿ã¼ã³å ¨ä½ã«é©ç¨ããã¾ããæä¸ä½ã¨åãè¨å®ãè¤æ°åè¡ãã㦠- ããå ´åãæãå³å´ã®è¨å®ã使ç¨ããã¾ãã - - ãµããã¿ã¼ã³ã®å é¨ã§ãªãã·ã§ã³ã®å¤æ´ãè¡ãããå ´åãå¹æã¯ - ç°ãªãã¾ãããã®åä½ã®å¤æ´ã¯ãPerl 5.005 ã§è¡ããã¾ããã - ãµããã¿ã¼ã³å ã®ãªãã·ã§ã³å¤æ´ã¯ããããæå®ãããµããã¿ã¼ - ã³ã®ãã®é¨åã«ã®ã¿å½±é¿ãã¾ãããã®ããã + ã¯ã³ã³ãã¤ã«å¾ã®ãã¿ã¼ã³ã¨ãã¦ã¯ããã¿ã¼ã³ abc ã« + <link linkend="pcre.pattern.modifiers">PCRE_CASELESS</link> + ãè¨å®ãããã®ã¨ãªãåãã«ãªãã¾ããè¨ããããã¨ããã®ãã㪠+ "æä¸ä½ã®"è¨å®ã¯ã(ãµããã¿ã¼ã³å é¨ã§ä»ã®å¤æ´ãè¡ããªãéã) + ãã¿ã¼ã³å ¨ä½ã«é©ç¨ããã¾ããæä¸ä½ã¨åãè¨å®ãè¤æ°åè¡ãã㦠+ ããå ´åãæãå³å´ã®è¨å®ã使ç¨ããã¾ãã + + ãµããã¿ã¼ã³ã®å é¨ã§ãªãã·ã§ã³ã®å¤æ´ãè¡ãããå ´åãå¹æã¯ + ç°ãªãã¾ãããã®åä½ã®å¤æ´ã¯ãPerl 5.005 ã§è¡ããã¾ããã + ãµããã¿ã¼ã³å ã®ãªãã·ã§ã³å¤æ´ã¯ããããæå®ãããµããã¿ã¼ + ã³ã®ãã®é¨åã«ã®ã¿å½±é¿ãã¾ãããã®ããã (a(?i)b)c - ã¯ãabc ããã³ aBc ã«ããããã(PCRE_CASELESS ã使ç¨ãã㦠- ããªãã¨ä»®å®ããå ´åã)ä»ã®æååã«ã¯ããããã¾ããã - ãã®ããã«ããªãã·ã§ã³ã¯ããã¿ã¼ã³ã®åå ´æã«ç°ãªã£ãè¨å®ãè¡ã - ãã¨ãå¯è½ã§ãããã鏿è¢ã«å¾¡ããªãã夿´ã¯å ¨ã¦ãåããµãã - ã¿ã¼ã³å ã®å¾ã«ç¶ãæã«æ³¢åãã¾ããä¾ãã°ã + ã¯ãabc ããã³ aBc ã«ããããã(<link + linkend="pcre.pattern.modifiers">PCRE_CASELESS</link>ã使ç¨ãã + ã¦ããªãã¨ä»®å®ããå ´åã)ä»ã®æååã«ã¯ããããã¾ããã + ãã®ããã«ããªãã·ã§ã³ã¯ããã¿ã¼ã³ã®åå ´æã«ç°ãªã£ãè¨å®ãè¡ã + ãã¨ãå¯è½ã§ãããã鏿è¢ã«å¾¡ããªãã夿´ã¯å ¨ã¦ãåããµãã + ã¿ã¼ã³å ã®å¾ã«ç¶ãæã«æ³¢åãã¾ããä¾ãã°ã (a(?i)b|c) - ã¯ã"C" ã«ãããããéã«æåã®æããªãã·ã§ã³è¨å®åã«ç ´æ£ - ããã¦ããã«ããããããã"ab", "aB", "c", "C" ã«ããããã¾ãã - ããã¯ããªãã·ã§ã³è¨å®ã®å¹æãã³ã³ãã¤ã«æã«çãããã¨ã«ãã - ã¾ããããã§ãªãã¨ãé常ã«å¥å¦ãªãã¨ãçãããã¨ã«ãªãã¾ãã - - PCRE ç¹æã®ãªãã·ã§ã³ãPCRE_UNGREEDY ããã³ PCRE_EXTRA - ã¯ããããæå U ããã³ X ã使ç¨ãããã¨ã«ãããPerl äºæã® - ãªãã·ã§ã³ã¨åæ§ã«å¤æ´ãããã¨ãå¯è½ã§ãã - (?X) ãã©ã°ã®è¨å®ã¯ç¹å¥ã§ãæä¸ä½ã®å ´åã§ãã常ã«ãã¿ã¼ã³ - å ã§ä»ã®è¨å®ããªã³ã«ããåã«æå®ããå¿ è¦ãããã¾ãã - ãã®ãã©ã°ã¯ãæåã«æå®ããã®ãæåã§ãã - + ã¯ã"C" ã«ãããããéã«æåã®æããªãã·ã§ã³è¨å®åã«ç ´æ£ + ããã¦ããã«ããããããã"ab", "aB", "c", "C" ã«ããããã¾ãã + ããã¯ããªãã·ã§ã³è¨å®ã®å¹æãã³ã³ãã¤ã«æã«çãããã¨ã«ãã + ã¾ããããã§ãªãã¨ãé常ã«å¥å¦ãªãã¨ãçãããã¨ã«ãªãã¾ãã + + PCRE ç¹æã®ãªãã·ã§ã³ã<link + linkend="pcre.pattern.modifiers">PCRE_UNGREEDY</link>ããã³<link + linkend="pcre.pattern.modifiers">PCRE_EXTRA</link>ã¯ããããæå + U ããã³ X ã使ç¨ãããã¨ã«ãããPerl äºæã®ãªãã·ã§ã³ã¨åæ§ã«å¤ + æ´ãããã¨ãå¯è½ã§ãã + (?X) ãã©ã°ã®è¨å®ã¯ç¹å¥ã§ãæä¸ä½ã®å ´åã§ãã常ã«ãã¿ã¼ã³ + å ã§ä»ã®è¨å®ããªã³ã«ããåã«æå®ããå¿ è¦ãããã¾ãã + ãã®ãã©ã°ã¯ãæåã«æå®ããã®ãæåã§ãã </literallayout> </refsect2> + <refsect2 id="regexp.reference.subpatterns"> <title>ãµããã¿ã¼ã³</title> <literallayout> - ãµããã¿ã¼ã³ã¯æ¬å¼§(丸æ¬å¼§)ã§åºåããããã¹ããå¯è½ã§ãã - ãã¿ã¼ã³ã®ä¸é¨ããµããã¿ã¼ã³ã¨ãã¦æå®ããããã«ã¯ã2ã¤ã®ã - ã¨ãè¡ãã¾ãã + ãµããã¿ã¼ã³ã¯æ¬å¼§(丸æ¬å¼§)ã§åºåããããã¹ããå¯è½ã§ãã + ãã¿ã¼ã³ã®ä¸é¨ããµããã¿ã¼ã³ã¨ãã¦æå®ããããã«ã¯ã2ã¤ã®ã + ã¨ãè¡ãã¾ãã - 1. 鏿è¢ã®éåããã¼ã«ã«åãã¾ããä¾ãã°ããã¿ã¼ã³ + 1. 鏿è¢ã®éåããã¼ã«ã«åãã¾ããä¾ãã°ããã¿ã¼ã³ cat(aract|erpillar|) - ã¯ãåèª "cat", "cataract", "caterpillar" ã«ããããã¾ãã - æ¬å¼§ãã¤ããªãã¨ããã®ãã¿ã¼ã³ã¯ã"cataract", - "erpillar" ã¾ãã¯ç©ºã®æååã«ããããã¦ãã¾ãã¾ãã - - 2. æ¬å¼§ã¯ããµããã¿ã¼ã³ã(以ä¸ã§å®ç¾©ãã)å¤ãåå¾ãããµããã¿ã¼ã³ - ã¨ãã¦è¨å®ãã¾ãããã¿ã¼ã³å ¨ä½ãããããããµããã¿ã¼ã³ã«ããã - ãã対象æååã®ä¸é¨ã¯ã - <function>pcre_exec</function> ã® <emphasis>ovector</emphasis> - 弿°ã«ããã³ã¼ã«ããå´ã«è¿ããã¾ããå¤ãåå¾ãããµããã¿ã¼ã³ã® - çªå·ãå¾ãããã«æ¬å¼§ã®å§ã¾ãã¯(1ããå§ã¾ã£ã¦)å·¦ããå³ã«æ°ãããã¾ãã - - ä¾ãã°ãæåå "the red king" ãæ¬¡ã®ãã¿ã¼ã³ã«ããããããå ´åã + ã¯ãåèª "cat", "cataract", "caterpillar" ã«ããããã¾ãã + æ¬å¼§ãã¤ããªãã¨ããã®ãã¿ã¼ã³ã¯ã"cataract", + "erpillar" ã¾ãã¯ç©ºã®æååã«ããããã¦ãã¾ãã¾ãã + + 2. æ¬å¼§ã¯ããµããã¿ã¼ã³ã(以ä¸ã§å®ç¾©ãã)å¤ãåå¾ãããµããã¿ã¼ã³ + ã¨ãã¦è¨å®ãã¾ãããã¿ã¼ã³å ¨ä½ãããããããµããã¿ã¼ã³ã«ããã + ãã対象æååã®ä¸é¨ã¯ã + <function>pcre_exec</function> ã® <emphasis>ovector</emphasis> + 弿°ã«ããã³ã¼ã«ããå´ã«è¿ããã¾ããå¤ãåå¾ãããµããã¿ã¼ã³ã® + çªå·ãå¾ãããã«æ¬å¼§ã®å§ã¾ãã¯(1ããå§ã¾ã£ã¦)å·¦ããå³ã«æ°ãããã¾ãã + + ä¾ãã°ãæåå "the red king" ãæ¬¡ã®ãã¿ã¼ã³ã«ããããããå ´åã the ((red|white) (king|queen)) - åå¾ãããé¨åæååã¯ã "red king", "red", "king" ã§ããã - ãããã 1, 2, 3 çªã¨ãªãã¾ãã + åå¾ãããé¨åæååã¯ã "red king", "red", "king" ã§ããã + ãããã 1, 2, 3 çªã¨ãªãã¾ãã - æ¬å¼§ã2ã¤ã®æ©è½ãæãã¦ããã¨ããäºå®ã常ã«è¯ãæ¹ã«åãããã§ - ã¯ããã¾ãããå¤ãåå¾ããå¿ è¦ã¯ãªããããµããã¿ã¼ã³ãè¤æ°ç¨ - ãããã¨ãå¿ è¦ã§ããå ´åãå°ãªãããã¾ãããå·¦æ¬å¼§ã®å¾ã« "?:" - ãä»ããå ´åããã®ãµããã¿ã¼ã³ã¯å¤ã®åå¾ãè¡ãããå¤ãåå¾ãã - ãµããã¿ã¼ã³ã®çªå·ãè¨ç®ããéã«ãå ç®ããã¾ãããä¾ãã°ãæåå - "the white queen" ã¯æ¬¡ã®ãã¿ã¼ã³ããããããã¦ã¿ã¾ãããã + æ¬å¼§ã2ã¤ã®æ©è½ãæãã¦ããã¨ããäºå®ã常ã«è¯ãæ¹ã«åãããã§ + ã¯ããã¾ãããå¤ãåå¾ããå¿ è¦ã¯ãªããããµããã¿ã¼ã³ãè¤æ°ç¨ + ãããã¨ãå¿ è¦ã§ããå ´åãå°ãªãããã¾ãããå·¦æ¬å¼§ã®å¾ã« "?:" + ãä»ããå ´åããã®ãµããã¿ã¼ã³ã¯å¤ã®åå¾ãè¡ãããå¤ãåå¾ãã + ãµããã¿ã¼ã³ã®çªå·ãè¨ç®ããéã«ãå ç®ããã¾ãããä¾ãã°ãæåå + "the white queen" ã¯æ¬¡ã®ãã¿ã¼ã³ããããããã¦ã¿ã¾ãããã the ((?:red|white) (king|queen)) @@ -1515,17 +1991,18 @@ ã¯Cã³ã¡ã³ãã«æ£ããããããã¾ããæ§ã ãªå復æå®åã®æå³ã¯ã ä»ã«ã¯å¤åããã好ã¾ãããããã®æ°ã ãã夿´ããã¾ãã - ãã®çå符ã®ä½¿ç¨æ³ãå復æå®åããã®?kããå ´åã®ä½¿ç¨æ³ã¨ - ãããªã©ã³ããªãããã«ã£fä¸ããã2稩^ã®ä½¿ç¨æ³ãããã®ã§ã - æã ãæ¬¡ã®ããã«2éã«ä½¿ç¨ããããã¨ãããã¾ãã + ãã®çå符ã®ä½¿ç¨æ³ãå復æå®åããã®å³ã«ããå ´åã®ä½¿ç¨æ³ã¨æ··ä¹±ã + ãªãã§ä¸ããããã®ããã«2種é¡ã®ä½¿ç¨æ³ããããããæã ãæ¬¡ã®ããã« + 2éã«ä½¿ç¨ããããã¨ãããã¾ãã \d??\d 鏿ã«ãã1æ¡ã®æ°åã«ããããã¾ããããã¿ã¼ã³ã®æ®ããããã ããå¯ä¸ã®æ¹æ³ã§ããå ´åã«ã¯ã2æ¡ã®æ°å¤ã«ããããããã¨ãå¯è½ã§ãã - PCRE_UNGREEDY ãªãã·ã§ã³ãè¨å®ãããå ´å(Perl ã§ã¯ãã®ãªãã·ã§ã³ - ã¯ä½¿ç¨ã§ãã¾ãã)ãå復æå®åã¯ããã©ã«ãã§ã¯è²ªæ¬²ã§ã¯ããã¾ããã + <link linkend="pcre.pattern.modifiers">PCRE_UNGREEDY</link>ãªãã·ã§ + ã³ãè¨å®ãããå ´å(Perl ã§ã¯ãã®ãªãã·ã§ã³ã¯ä½¿ç¨ã§ãã¾ãã)ãå復 + æå®åã¯ããã©ã«ãã§ã¯è²ªæ¬²ã§ã¯ããã¾ããã ãããããã®å復æå®åã¯ãå¾ãã«çå符ãã¤ãããã¨ã«ãã貪欲 ã«ãããã¨ãå¯è½ã§ããè¨ããããã¨ãçå符ã¯ãããã©ã«ãã®åä½ ãé転ãã¾ãã @@ -1535,8 +2012,9 @@ ã¾ãã¯æå°ã®å¤§ããã«å¿ãã¦ããå¤ãã®ä¿åé åãå¿ è¦ã¨ãªãã¾ãã ãã¿ã¼ã³ãã.* ã¾ã㯠.(0,) ã§å§ã¾ãã(Perl ã§ç価ãªãã®ã¯ /s) - PCRE_DOTALL ãªãã·ã§ã³ãè¨å®ããã¦ããå ´åã. ã¯æ¹è¡ã«ããã - ã§ããããã«ãªããã?Ã¼Ã³ã¯æé»ã®ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãªãã·ã§ + ã³ãè¨å®ããã¦ããå ´åã. ã¯æ¹è¡ã«ãããã§ããããã«ãªããæé»ã® + ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã ããã¯ãå¾ãã«ç¶ããã®ã«ãããã対象æååã®åæåã®ä½ç½®ã« 対ãã¦è©¦è¡ãããããã§ãããã®ãããæåã«ãããããå¾ã§ ã©ããã®ä½ç½®ã§å ¨ä½ã®ããããåã³è¡ããã¨ã¯ã§ãã¾ããã @@ -1544,7 +2022,9 @@ PCRE ã¯ãã®ãããªãã¿ã¼ã³ã \A ãåã«ãããã®ã¨ãã¦å¦çãã¾ãã 対象æååãæ¹è¡ãå«ã¾ãªããã¨ãæ¢ç¥ã®å ´åã ãã¿ã¼ã³ã .* ã§å§ã¾ãå ´åã®æé©åã®ããã«ããã㯠^ ãç¨ã㦠- ã¢ã³ã«ã¼ãé½ã«ç¤ºãããã«PCRE_DOTALL ãè¨å®ãã価å¤ãããã¾ãã + ã¢ã³ã«ã¼ãé½ã«ç¤ºãããã«<link + linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãè¨å®ããä¾¡å¤ + ãããã¾ãã å¤ãåå¾ãããµããã¿ã¼ã³ãç¹°ãè¿ãããæãåå¾ãããå¤ã¯ã æå¾ã®ç¹°ãè¿ãã§ãããããé¨åæååã§ããä¾ãã°ã @@ -1567,194 +2047,193 @@ <refsect2 id="regexp.reference.back_references"> <title>徿¹åç §</title> <literallayout> - æåã¯ã©ã¹ã®å¤ã§ãããã¯ã¹ã©ãã·ã¥ã®å¾ã« 0 ãã大ããæ°åã - ä»ãããã®ã¯ãã¿ã¼ã³ã§ä»¥åã«(ããªãã¡å·¦ã«ãã)å¤ãåå¾ãã - ãµããã¿ã¼ã³ã«å¯¾ãã徿¹åç §ã§ãããåã«ããå¤ã®åå¾ãè¡ã - å·¦æ¬å¼§ã®æ°ã¾ã§ä½¿ç¨å¯è½ã§ãã - - ããããããã¯ã¹ã©ãã·ã¥ã®å¾ã«ç¶ã10鲿°ã10æªæºã®å ´åã¯å¸¸ã« - 徿¹åç §ã¨ãã¦è§£éããããã¿ã¼ã³å ¨ä½ã®å¤ãåå¾ããå·¦æ¬å¼§ã®æ° - ã«æºããªãå ´åã«ã®ã¿ã¨ã©ã¼ã¨ãªãã¾ãã - è¨ããããã¨ãåç §ãããæ¬å¼§ã¯10æªæºã®æ°ã«ã¤ãã¦ã¯åç §ããå´ - ã®å·¦ã«ããå¿ è¦ããªãã¨ãããã¨ã§ãã - ããã¯ã¹ã©ãã·ã¥ã®å¾ã«æ°åãç¶ãå ´åã®å¦çã®è©³ç´°ã«ã¤ãã¦ã¯ã - ä¸è¨ã® "ããã¯ã¹ã©ãã·ã¥"ã¨ããé¡ã®ç¯ãåç §ä¸ããã - - 徿¹åç §ã¯ããµããã¿ã¼ã³èªä½ãããããããã®ãããããã - ç¾å¨ã®å¯¾è±¡æååã«ãããå¤ãåå¾ãããã¿ã¼ã³ãå®éã«ãããã - ããã®ã«ããããã¾ãããã®ããããã¿ã¼ã³ - + æåã¯ã©ã¹ã®å¤ã§ãããã¯ã¹ã©ãã·ã¥ã®å¾ã« 0 ãã大ããæ°åã + ä»ãããã®ã¯ãã¿ã¼ã³ã§ä»¥åã«(ããªãã¡å·¦ã«ãã)å¤ãåå¾ãã + ãµããã¿ã¼ã³ã«å¯¾ãã徿¹åç §ã§ãããåã«ããå¤ã®åå¾ãè¡ã + å·¦æ¬å¼§ã®æ°ã¾ã§ä½¿ç¨å¯è½ã§ãã + + ããããããã¯ã¹ã©ãã·ã¥ã®å¾ã«ç¶ã10鲿°ã10æªæºã®å ´åã¯å¸¸ã« + 徿¹åç §ã¨ãã¦è§£éããããã¿ã¼ã³å ¨ä½ã®å¤ãåå¾ããå·¦æ¬å¼§ã®æ° + ã«æºããªãå ´åã«ã®ã¿ã¨ã©ã¼ã¨ãªãã¾ãã + è¨ããããã¨ãåç §ãããæ¬å¼§ã¯10æªæºã®æ°ã«ã¤ãã¦ã¯åç §ããå´ + ã®å·¦ã«ããå¿ è¦ããªãã¨ãããã¨ã§ãã + ããã¯ã¹ã©ãã·ã¥ã®å¾ã«æ°åãç¶ãå ´åã®å¦çã®è©³ç´°ã«ã¤ãã¦ã¯ã + ä¸è¨ã® "ããã¯ã¹ã©ãã·ã¥"ã¨ããé¡ã®ç¯ãåç §ä¸ããã + + 徿¹åç §ã¯ããµããã¿ã¼ã³èªä½ãããããããã®ãããããã + ç¾å¨ã®å¯¾è±¡æååã«ãããå¤ãåå¾ãããã¿ã¼ã³ãå®éã«ãããã + ããã®ã«ããããã¾ãããã®ããããã¿ã¼ã³ + (sens|respons)e and \1ibility - ã¯ã"sense and sensibility" ããã³ "response and responsi- - bility" ã«ããããã¾ããã"sense and responsibility" ã«ã¯ - ããããã¾ããã徿¹åç §ã®æç¹ã§ã大æåå°æåãåºå¥ããããã - ãæå¹ã®å ´åãæåã®å¤§æåå°æåãé¢ä¿ãã¾ããä¾ãã°ã - + ã¯ã"sense and sensibility" ããã³ "response and responsi- + bility" ã«ããããã¾ããã"sense and responsibility" ã«ã¯ + ããããã¾ããã徿¹åç §ã®æç¹ã§ã大æåå°æåãåºå¥ããããã + ãæå¹ã®å ´åãæåã®å¤§æåå°æåãé¢ä¿ãã¾ããä¾ãã°ã + ((?i)rah)\s+\1 - - ã¯ã"rah rah" ããã³ "RAH RAH" ã«ããããã¾ããã - å ã®åå¾ãããµããã¿ã¼ã³ã¯å¤§æåå°æåãåºå¥ããããããã¦ã - ãã«ããããããã"RAH rah" ã«ã¯ããããã¾ããã - - åããµããã¿ã¼ã³ã«è¤æ°åã®å¾æ¹åç §ãè¡Fãã¨ãã§ãã¾ãããã - ãµããã¿ã¼ã³ãç¹å®ã®ãããã§å®éã«ã¯ä½¿ç¨ããã¦ããªãå ´åã - 徿¹åç §ã¯å¸¸ã«å¤±æãã¾ããä¾ãã°ããã¿ã¼ã³ - + + ã¯ã"rah rah" ããã³ "RAH RAH" ã«ããããã¾ããã + å ã®åå¾ãããµããã¿ã¼ã³ã¯å¤§æåå°æåãåºå¥ããããããã¦ã + ãã«ããããããã"RAH rah" ã«ã¯ããããã¾ããã + + åããµããã¿ã¼ã³ã«è¤æ°åã®å¾æ¹åç §ãè¡Fãã¨ãã§ãã¾ãããã + ãµããã¿ã¼ã³ãç¹å®ã®ãããã§å®éã«ã¯ä½¿ç¨ããã¦ããªãå ´åã + 徿¹åç §ã¯å¸¸ã«å¤±æãã¾ããä¾ãã°ããã¿ã¼ã³ + (a|(bc))\2 - ã¯ã"bc" ã§ã¯ãªã "a" ã«æåã«ãããããå ´åã«å¸¸ã«å¤±æãã¾ãã - æå¤§ 99 åã®å¾æ¹åç §ã使ç¨ã§ãããããããã¯ã¹ã©ãã·ã¥ã®å¾ã« - æ°åãç¶ããã®ã¯å ¨ã¦å¾æ¹åç §çªå·ã®å¯è½æ§ãããéåã¨ãã¦è§£é - ããã¾ãã - ãã¿ã¼ã³ã®å¾ã«æ°åãç¶ãå ´åã徿¹åç §ãçµäºããããã« - ãªãããã®åºåãæåãç½®ãå¿ è¦ãããã¾ãã - PCRE_EXTENDED ãªãã·ã§ã³ãè¨å®ãã¦ããå ´åã空ç½ãåºåãæå - ã¨ãããã¨ãã§ãã¾ãããã®ä»ã®å ´åã¯ç©ºã®ã³ã¡ã³ãã使ç¨ã§ãã¾ãã - - åç §ããæ¬å¼§ã®ä¸ã«ãã徿¹åç §ã¯ããµããã¿ã¼ã³ãæåã«ä½¿ç¨ã - ãéã«å¤±æãã¾ãããã®ããã(a\1) ã¯ä½ã«ãããããã¾ããã - ãããããã®ãããªåç §ã¯ãè¤æ°å使ç¨ãããµããã¿ã¼ã³ã®å é¨ã§ - æç¨ã§ããä¾ãã°ã次ã®ãã¿ã¼ã³ - + ã¯ã"bc" ã§ã¯ãªã "a" ã«æåã«ãããããå ´åã«å¸¸ã«å¤±æãã¾ãã + æå¤§ 99 åã®å¾æ¹åç §ã使ç¨ã§ãããããããã¯ã¹ã©ãã·ã¥ã®å¾ã« + æ°åãç¶ããã®ã¯å ¨ã¦å¾æ¹åç §çªå·ã®å¯è½æ§ãããéåã¨ãã¦è§£é + ããã¾ãã + ãã¿ã¼ã³ã®å¾ã«æ°åãç¶ãå ´åã徿¹åç §ãçµäºããããã« + ãªãããã®åºåãæåãç½®ãå¿ è¦ãããã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ãªã + ã·ã§ã³ãè¨å®ãã¦ããå ´åã空ç½ãåºåãæåã¨ãããã¨ãã§ãã¾ãã + ãã®ä»ã®å ´åã¯ç©ºã®ã³ã¡ã³ãã使ç¨ã§ãã¾ãã + + åç §ããæ¬å¼§ã®ä¸ã«ãã徿¹åç §ã¯ããµããã¿ã¼ã³ãæåã«ä½¿ç¨ã + ãéã«å¤±æãã¾ãããã®ããã(a\1) ã¯ä½ã«ãããããã¾ããã + ãããããã®ãããªåç §ã¯ãè¤æ°å使ç¨ãããµããã¿ã¼ã³ã®å é¨ã§ + æç¨ã§ããä¾ãã°ã次ã®ãã¿ã¼ã³ + (a|b\1)+ - ã¯ã"a" ã®ä¸¦ã³ãããã³ "aba"ã"ababaa" çã«ãããããã¾ãã - ãµããã¿ã¼ã³ã®åå復ã«ããã¦ã徿¹åç §ã¯ãåã®ç¹°ãè¿ãã«å¯¾å¿ - ããæååã«ããããã¾ãããããåä½ãããããã«ãæåã®å復 - æã«å¾æ¹åç §ã«ãããããå¿ è¦ããªããããªãã¿ã¼ã³ã§ããå¿ è¦ã - ããã¾ããããã¯ä¸ã®ä¾ã®ããã«é¸æã使ç¨ããããã¼ããæå°ã¨ - ããå復æå®åã«ããè¡ããã¨ãã§ãã¾ãã - + ã¯ã"a" ã®ä¸¦ã³ãããã³ "aba"ã"ababaa" çã«ãããããã¾ãã + ãµããã¿ã¼ã³ã®åå復ã«ããã¦ã徿¹åç §ã¯ãåã®ç¹°ãè¿ãã«å¯¾å¿ + ããæååã«ããããã¾ãããããåä½ãããããã«ãæåã®å復 + æã«å¾æ¹åç §ã«ãããããå¿ è¦ããªããããªãã¿ã¼ã³ã§ããå¿ è¦ã + ããã¾ããããã¯ä¸ã®ä¾ã®ããã«é¸æã使ç¨ããããã¼ããæå°ã¨ + ããå復æå®åã«ããè¡ããã¨ãã§ãã¾ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.assertions"> <title>è¨æ</title> <literallayout> - è¨æã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã®å¾ã«ç¶ããåã«ããæåã« - 対ãããã¹ãã§ãããå®éã«ã¯æåã¸ã®ä½ç¨ãè¡ãã¾ããã - - \b, \B, \A, \Z, \z, ^, $ ã®ãããªç°¡åãªè¨æã³ã¼ãã以ä¸ã§èª¬ - æãã¾ããããè¤éãªè¨æã¯ããµããã¿ã¼ã³ã¨ãã¦ã³ã¼ãåããã¾ - ãã2種é¡ã®è¨æãããã¾ãã対象æååã«ããã¦ç¾å¨ä½ç½®ã®åã - è¦ããã®ã¨ãå¾ããè¦ããã®ã§ãã - - è¨æãµããã¿ã¼ã³ã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã夿´ãããªã - ãã¨ãé¤ããé常ã¨åãããã«ãããããã¾ããåæ¹ã¸ã®è¨æã¯ã - è¯å®è¨æã®å ´å (?= ã§ãå¦å®è¨æã®å ´å (?! ã§å§ã¾ãã¾ããä¾ãã°ã + è¨æã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã®å¾ã«ç¶ããåã«ããæåã« + 対ãããã¹ãã§ãããå®éã«ã¯æåã¸ã®ä½ç¨ãè¡ãã¾ããã + + \b, \B, \A, \Z, \z, ^, $ ã®ãããªç°¡åãªè¨æã³ã¼ãã以ä¸ã§èª¬ + æãã¾ããããè¤éãªè¨æã¯ããµããã¿ã¼ã³ã¨ãã¦ã³ã¼ãåããã¾ + ãã2種é¡ã®è¨æãããã¾ãã対象æååã«ããã¦ç¾å¨ä½ç½®ã®åã + è¦ããã®ã¨ãå¾ããè¦ããã®ã§ãã + + è¨æãµããã¿ã¼ã³ã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã夿´ãããªã + ãã¨ãé¤ããé常ã¨åãããã«ãããããã¾ããåæ¹ã¸ã®è¨æã¯ã + è¯å®è¨æã®å ´å (?= ã§ãå¦å®è¨æã®å ´å (?! ã§å§ã¾ãã¾ããä¾ãã°ã \w+(?=;) - ã¯ãã»ãã³ãã³ãå¾ã«ç¶ãåèªã«ããããã¾ãããããããããã® - ã«ã¯ãã»ãã³ãã³ãå«ã¾ãããããã¦ã + ã¯ãã»ãã³ãã³ãå¾ã«ç¶ãåèªã«ããããã¾ãããããããããã® + ã«ã¯ãã»ãã³ãã³ãå«ã¾ãããããã¦ã foo(?!bar) - ã¯ã"bar" ãå¾ãã«ç¶ããªã "foo" ã«ããããã¾ãã - è¦ããã¯ä¼¼ã¦ãããã¿ã¼ã³ã«æ³¨æãã¦ä¸ããã + ã¯ã"bar" ãå¾ãã«ç¶ããªã "foo" ã«ããããã¾ãã + è¦ããã¯ä¼¼ã¦ãããã¿ã¼ã³ã«æ³¨æãã¦ä¸ããã (?!foo)bar - ã¯ã"foo" 以å¤ã®ãã®ãåã«ãã "bar" ã®åå¨ãè¦ã¤ãããã¾ããã - 次ã®3æåã "bar" ã§ããå ´åã«ã(?!foo) ã¯å¸¸ã« &true; ã¨ãªããã - ã«ããã®ãã¿ã¼ã³ã¯ã"bar" ã®åå¨ãè¦ã¤ãããã¨ãã§ããªãã®ã§ãã - ãã®åä½ãå®ç¾ããããã«ã¯ã徿¹è¨æãå¿ è¦ã§ãã - 徿¹è¨æã¯ãè¯å®è¨æã®å ´å (?<= ã§ãå¦å®è¨æã®å ´å (?<! - ã§å§ã¾ãã¾ããä¾ãã°ã + ã¯ã"foo" 以å¤ã®ãã®ãåã«ãã "bar" ã®åå¨ãè¦ã¤ãããã¾ããã + 次ã®3æåã "bar" ã§ããå ´åã«ã(?!foo) ã¯å¸¸ã« &true; ã¨ãªããã + ã«ããã®ãã¿ã¼ã³ã¯ã"bar" ã®åå¨ãè¦ã¤ãããã¨ãã§ããªãã®ã§ãã + ãã®åä½ãå®ç¾ããããã«ã¯ã徿¹è¨æãå¿ è¦ã§ãã + 徿¹è¨æã¯ãè¯å®è¨æã®å ´å (?<= ã§ãå¦å®è¨æã®å ´å (?<! + ã§å§ã¾ãã¾ããä¾ãã°ã (?<!foo)bar - ã¯ã"foo" ãåã«ãªã "bar" ã®åå¨ãè¦ã¤ãã¾ãã徿¹è¨æã®å 容 - ã¯ããããããæååå ¨ä½ãåºå®é·ã§ããå¿ è¦ããããã¨ã«å¶éã - ãã¦ãã¾ããããããè¤æ°ã®é¸æè¢ãããå ´åãå ¨ã¦ã®åãåºå®é· - ã§ããå¿ è¦ã¯ããã¾ãããã¤ã¾ãã + ã¯ã"foo" ãåã«ãªã "bar" ã®åå¨ãè¦ã¤ãã¾ãã徿¹è¨æã®å 容 + ã¯ããããããæååå ¨ä½ãåºå®é·ã§ããå¿ è¦ããããã¨ã«å¶éã + ãã¦ãã¾ããããããè¤æ°ã®é¸æè¢ãããå ´åãå ¨ã¦ã®åãåºå®é· + ã§ããå¿ è¦ã¯ããã¾ãããã¤ã¾ãã (?<=bullock|donkey) - ã¯ä½¿ç¨å¯è½ã§ããã + ã¯ä½¿ç¨å¯è½ã§ããã (?<!dogs?|cats?) - ã¯ã³ã³ãã¤ã«æã«ã¨ã©ã¼ãçãã¾ããç°ãªã£ãé·ãã®æååã«ãã - ãããæã¯ã徿¹è¨æã®æä¸ä½ã§ã®ã¿ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã - å ¨ã¦ã®æã®åãé·ãã®æååã«ãããããå¿ è¦ããã Perl 5.005 - ã«å¯¾ãã¦æ¡å¼µããã¦ãã¾ããæ¬¡ã®ãããªè¨æ - - (?<=ab(c|de)) - - ã¯ãæä¸ä½ã®æã2ã¤ã®ç°ãªã£ãé·ãã«ããããå¾ãããã使ç¨ã§ã - ã¾ãããããããæä¸ä½ã®æã2ã¤ä½¿ç¨ããããã«æ¸ãæããå ´åã¯ã - 使ç¨å¯è½ã§ãã + ã¯ã³ã³ãã¤ã«æã«ã¨ã©ã¼ãçãã¾ããç°ãªã£ãé·ãã®æååã«ãã + ãããæã¯ã徿¹è¨æã®æä¸ä½ã§ã®ã¿ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã + å ¨ã¦ã®æã®åãé·ãã®æååã«ãããããå¿ è¦ããã Perl 5.005 + ã«å¯¾ãã¦æ¡å¼µããã¦ãã¾ããæ¬¡ã®ãããªè¨æ + + (?<=ab(c|de)) + + ã¯ãæä¸ä½ã®æã2ã¤ã®ç°ãªã£ãé·ãã«ããããå¾ãããã使ç¨ã§ã + ã¾ãããããããæä¸ä½ã®æã2ã¤ä½¿ç¨ããããã«æ¸ãæããå ´åã¯ã + 使ç¨å¯è½ã§ãã (?<=abc|abde) - 徿¹è¨æã®å®è£ ã«ããã¦ã¯ãé¸æè¢æ¯ã«ä¸æçã«åºå®ã®å¹ ã ãç¾å¨ã® - ä½ç½®ãå¾éãããããã試ã¿ã¾ããç¾å¨ä½ç½®ã®åã«ååãªæåããªã - å ´åã¯ããããã¯å¤±æã¨ã¿ãªããã¾ãã1度ãã使ç¨ãããªããµãã - ã¿ã¼ã³ã¨çµã¿åããã徿¹è¨æã¯ãæååã®çµç«¯ã§ã®ãããã³ã°ã« - ç¹ã«æç¨ã§ããç¯ã®æå¾ã«1度ã ã使ç¨ãããµããã¿ã¼ã³ã®ä¾ã示ã - ã¾ãã + 徿¹è¨æã®å®è£ ã«ããã¦ã¯ãé¸æè¢æ¯ã«ä¸æçã«åºå®ã®å¹ ã ãç¾å¨ã® + ä½ç½®ãå¾éãããããã試ã¿ã¾ããç¾å¨ä½ç½®ã®åã«ååãªæåããªã + å ´åã¯ããããã¯å¤±æã¨ã¿ãªããã¾ãã1度ãã使ç¨ãããªããµãã + ã¿ã¼ã³ã¨çµã¿åããã徿¹è¨æã¯ãæååã®çµç«¯ã§ã®ãããã³ã°ã« + ç¹ã«æç¨ã§ããç¯ã®æå¾ã«1度ã ã使ç¨ãããµããã¿ã¼ã³ã®ä¾ã示ã + ã¾ãã - (ãããã種é¡ã®)è¤æ°ã®è¨æãé£ç¶ãã¦æå®ãããã¨ãå¯è½ã§ãã - ä¾ãã°ã + (ãããã種é¡ã®)è¤æ°ã®è¨æãé£ç¶ãã¦æå®ãããã¨ãå¯è½ã§ãã + ä¾ãã°ã (?<=\d{3})(?<!999)foo - - ã¯åã« "999" ã§ãªã3æ¡ã®æ°åããã "foo" ã«ããããã¾ãã - åè¨æã¯å¯¾è±¡æååã®åãå ´æã«ç¬ç«ãã¦é©ç¨ããããã¨ã«æ³¨æãã¦ä¸ - ãããã¾ããåã®3æåãå ¨ã¦æ°åã§ãããã¨ããã§ãã¯ãããç¶ãã¦ã - åã3æåã"999"ã§ãªããã¨ã確èªããã¾ãããã®ãã¿ã¼ã³ã¯ã"foo"ã® - åã«6åã®æåãããããã®ççããæ°åã§æå¾ã®3æåã"999"ã§ãªãã - ã¿ã¼ã³ã«ã¯ããããã¾ãããä¾ãã°ã"123abcfoo"ã«ã¯ããããã¾ããã - ãããè¡ããã¿ã¼ã³ã¯æ¬¡ã®ããã«ãªãã¾ãã + + ã¯åã« "999" ã§ãªã3æ¡ã®æ°åããã "foo" ã«ããããã¾ãã + åè¨æã¯å¯¾è±¡æååã®åãå ´æã«ç¬ç«ãã¦é©ç¨ããããã¨ã«æ³¨æãã¦ä¸ + ãããã¾ããåã®3æåãå ¨ã¦æ°åã§ãããã¨ããã§ãã¯ãããç¶ãã¦ã + åã3æåã"999"ã§ãªããã¨ã確èªããã¾ãããã®ãã¿ã¼ã³ã¯ã"foo"ã® + åã«6åã®æåãããããã®ççããæ°åã§æå¾ã®3æåã"999"ã§ãªãã + ã¿ã¼ã³ã«ã¯ããããã¾ãããä¾ãã°ã"123abcfoo"ã«ã¯ããããã¾ããã + ãããè¡ããã¿ã¼ã³ã¯æ¬¡ã®ããã«ãªãã¾ãã (?<=\d{3}...)(?<!999)foo - ãã®æãæåã®è¨æã¯ãå è¡ãã6ã¤ã®æåãæ¢ããæåã®3æåãæ°å - ã§ãããã¨ã確èªãã¾ããç¶ãã¦ã2çªç®ã®è¨æã¯ãå è¡ãã3æåã - "999"ã§ãªããã¨ã確èªãã¾ãã + ãã®æãæåã®è¨æã¯ãå è¡ãã6ã¤ã®æåãæ¢ããæåã®3æåãæ°å + ã§ãããã¨ã確èªãã¾ããç¶ãã¦ã2çªç®ã®è¨æã¯ãå è¡ãã3æåã + "999"ã§ãªããã¨ã確èªãã¾ãã - è¨æã¯ãèªç±ã«çµã¿åããã¦ãã¹ãããããã¨ãå¯è½ã§ããä¾ãã°ã + è¨æã¯ãèªç±ã«çµã¿åããã¦ãã¹ãããããã¨ãå¯è½ã§ããä¾ãã°ã (?<=(?<!foo)bar)baz - ã¯ã"bar" ãåã«ãããéã« "foo" ãåã«ãªã "baz" ã«ããããã¾ãã - 䏿¹ã - + ã¯ã"bar" ãåã«ãããéã« "foo" ãåã«ãªã "baz" ã«ããããã¾ãã + 䏿¹ã + (?<=\d{3}(?!999)...)foo - ã¯ã3æ¡ã®æ°ãå è¡ããä¸ã®3æåã"999"ã§ãªã"foo"ã«ãããããå¥ã® - ãã¿ã¼ã³ã§ãã - - è¨æã®ãµããã¿ã¼ã³ã¯å¤ãåå¾ãããµããã¿ã¼ã³ã§ã¯ãªããç¹°ã - è¿ãããªãããããã¾ãããããã¯ãåããã¨ãè¤æ°åè¨æããã® - ã¯æå³ããªãããã§ããããè¨æãå¤ãåå¾ãããµããã¿ã¼ã³ã - ä¸ã«å«ãã§ããå ´åããã¿ã¼ã³å ¨ä½ã®ä¸ã§å¤ãåå¾ãããµããã¿ã¼ - ã³ãæ°ããããã«å¸¸ã«æ°ãä¸ãããã¾ãã - åå¾ããé¨åæååã¯ãè¯å®è¨æã§ã¯ä½¿ç¨ããã¾ãããå¦å®è¨æ - ã§ã¯æå³ãæã¡ã¾ããã - - è¨æã®æ¬å¼§ã§æ¬ããããµããã¿ã¼ã³ã®æ°ã¯ãæå¤§ 200 ã§ãã - + ã¯ã3æ¡ã®æ°ãå è¡ããä¸ã®3æåã"999"ã§ãªã"foo"ã«ãããããå¥ã® + ãã¿ã¼ã³ã§ãã + + è¨æã®ãµããã¿ã¼ã³ã¯å¤ãåå¾ãããµããã¿ã¼ã³ã§ã¯ãªããç¹°ã + è¿ãããªãããããã¾ãããããã¯ãåããã¨ãè¤æ°åè¨æããã® + ã¯æå³ããªãããã§ããããè¨æãå¤ãåå¾ãããµããã¿ã¼ã³ã + ä¸ã«å«ãã§ããå ´åããã¿ã¼ã³å ¨ä½ã®ä¸ã§å¤ãåå¾ãããµããã¿ã¼ + ã³ãæ°ããããã«å¸¸ã«æ°ãä¸ãããã¾ãã + åå¾ããé¨åæååã¯ãè¯å®è¨æã§ã¯ä½¿ç¨ããã¾ãããå¦å®è¨æ + ã§ã¯æå³ãæã¡ã¾ããã + + è¨æã®æ¬å¼§ã§æ¬ããããµããã¿ã¼ã³ã®æ°ã¯ãæå¤§ 200 ã§ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.onlyonce"> <title>ä¸åã ã使ç¨ãããµããã¿ã¼ã³</title> <literallayout> - å復ãæå¤§åããã³æå°åããå ´åã¯å ±ã«ãå¾ã«ç¶ããã®ã¸ã®ãã - ãã失æããå ´åãå復æ°ãå¤ããå ´åã«ãã¿ã¼ã³ã®æ®ãã«ããã - ãããã¨ãã§ãããã©ããã調ã¹ãããã«å復ããé ç®ãåè©ä¾¡ã - ãã¾ãã - - æã ãããããåä½ãè¡ããªãæ¹ã便å©ãªãã¨ããã¾ãã - ããã¯ããã¿ã¼ã³ã®ä½è ãç¶ãã¦ãã価å¤ããªãã¨ããã£ãæã« - ãããã®ç¹æ§ã夿´ããããä»ã®ãã¨ãããããããåã«å¤±æãã - ãå ´åã§ãã + å復ãæå¤§åããã³æå°åããå ´åã¯å ±ã«ãå¾ã«ç¶ããã®ã¸ã®ãã + ãã失æããå ´åãå復æ°ãå¤ããå ´åã«ãã¿ã¼ã³ã®æ®ãã«ããã + ãããã¨ãã§ãããã©ããã調ã¹ãããã«å復ããé ç®ãåè©ä¾¡ã + ãã¾ãã + + æã ãããããåä½ãè¡ããªãæ¹ã便å©ãªãã¨ããã¾ãã + ããã¯ããã¿ã¼ã³ã®ä½è ãç¶ãã¦ãã価å¤ããªãã¨ããã£ãæã« + ãããã®ç¹æ§ã夿´ããããä»ã®ãã¨ãããããããåã«å¤±æãã + ãå ´åã§ãã - ä¾ãã°ããã¿ã¼ã³ \d+foo ãæ¬¡ã®å¯¾è±¡ã«é©ç¨ããå ´åãèãã¦ã¿ã¾ - ãããã + ä¾ãã°ããã¿ã¼ã³ \d+foo ãæ¬¡ã®å¯¾è±¡ã«é©ç¨ããå ´åãèãã¦ã¿ã¾ + ãããã 123456bar @@ -1849,89 +2328,88 @@ <refsect2 id="regexp.reference.conditional"> <title>æ¡ä»¶ä»ããµããã¿ã¼ã³</title> <literallayout> - è¨æã®çµæã¾ãã¯åã®å¤ãåå¾ãããµããã¿ã¼ã³ãããããããã© - ããã«ããããµããã¿ã¼ã³ã®ãããå¦çãè¡ã£ããããµããã¿ã¼ã³ã® - 2ã¤ã®é¸æè¢ã鏿ããããããã¨ãå¯è½ã§ããæ¡ä»¶ä»ããµããã¿ã¼ - ã³ã«ã¯2ã¤ã®å½¢å¼ãããã¾ãã + è¨æã®çµæã¾ãã¯åã®å¤ãåå¾ãããµããã¿ã¼ã³ãããããããã© + ããã«ããããµããã¿ã¼ã³ã®ãããå¦çãè¡ã£ããããµããã¿ã¼ã³ã® + 2ã¤ã®é¸æè¢ã鏿ããããããã¨ãå¯è½ã§ããæ¡ä»¶ä»ããµããã¿ã¼ + ã³ã«ã¯2ã¤ã®å½¢å¼ãããã¾ãã (?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern) - æ¡ä»¶ãæºããããå ´åãyes-pattern ã使ç¨ããã¾ããããã§ãªã - å ´åã¯ã(æå®ãããå ´åã¯) no-pattern ã使ç¨ããã¾ãããµãã - ã¿ã¼ã³ã«2ã¤ä»¥ä¸ã®é¸æè¢ãããå ´åãã³ã³ãã¤ã«æã«ã¨ã©ã¼ã«ãªã - ã¾ãã - - 2種é¡ã®æ¡ä»¶ãããã¾ããæ¬å¼§ã®éã®ããã¹ããæ°åã®ä¸¦ã³ãããªã - å ´åãæ¡ä»¶ã¯ããã®çªå·ã®å¤ãåå¾ãããµããã¿ã¼ã³ãåã«ããã - ãã¦ããå ´åã«æºãããã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã - å¯èªæ§ãé«ããããã«æå³ã®ãªã空ç½ãæ¿å ¥ã(PCRE_EXTENDED - ãªãã·ã§ã³ãæå®ãããã¨ä»®å®ãã¾ã)ã説æãç°¡åã«ãããã - 3ã¤ã®é¨åã«åå²ãã¦ãã¾ãã + æ¡ä»¶ãæºããããå ´åãyes-pattern ã使ç¨ããã¾ããããã§ãªã + å ´åã¯ã(æå®ãããå ´åã¯) no-pattern ã使ç¨ããã¾ãããµãã + ã¿ã¼ã³ã«2ã¤ä»¥ä¸ã®é¸æè¢ãããå ´åãã³ã³ãã¤ã«æã«ã¨ã©ã¼ã«ãªã + ã¾ãã + + 2種é¡ã®æ¡ä»¶ãããã¾ããæ¬å¼§ã®éã®ããã¹ããæ°åã®ä¸¦ã³ãããªã + å ´åãæ¡ä»¶ã¯ããã®çªå·ã®å¤ãåå¾ãããµããã¿ã¼ã³ãåã«ããã + ãã¦ããå ´åã«æºãããã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã + å¯èªæ§ãé«ããããã«æå³ã®ãªã空ç½ãæ¿å ¥ã(PCRE_EXTENDED + ãªãã·ã§ã³ãæå®ãããã¨ä»®å®ãã¾ã)ã説æãç°¡åã«ãããã + 3ã¤ã®é¨åã«åå²ãã¦ãã¾ãã ( \( )? [^()]+ (?(1) \) ) - æåã®é¨åã¯ããªãã·ã§ã³ã®å·¦æ¬å¼§ã«ããããããã®æåãããå ´ - åã«ãæåã®é¨åæååã¨ãã¦è¨å®ãã¾ãã第2ã®é¨åã¯ãæ¬å¼§ä»¥å¤ - ã®ä¸ã¤ä»¥ä¸ã®æåã«ããããã¾ãã第3ã®é¨åã¯ãæåã®æ¬å¼§ã«ãã - ããããã©ããã調ã¹ãæ¡ä»¶ä»ããµããã¿ã¼ã³ã§ããããããã¦ãã - å ´åãã¤ã¾ãã対象ãå·¦æ¬å¼§ã§å§ã¾ã£ã¦ããå ´åãæ¡ä»¶ã¯&true;㨠- ãªããyes-pattern ãå®è¡ããã峿¬å¼§ãå¿ è¦ã¨ãªãã¾ãã - ããã§ãªãå ´åãno-pattern ãåå¨ããªãããããµããã¿ã¼ã³ã¯ - ä½ã«ãããããã¾ãããè¨ããããã¨ããã®ãã¿ã¼ã³ã¯ãæ¬å¼§ãªã - ã®ä¸¦ã³ã«ããããããªãã·ã§ã³ã§æ¬å¼§ã§å²ã¾ãã並ã³ã«ããããã¾ãã - - æ¡ä»¶ãæ°åã®ä¸¦ã£gå 4åãè¨æã¨ãªãã¾ããè¯å®ãããã¯å¦å®ã® - åæ¹ã¾ãã¯å¾æ¹è¨æã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã - ãã®ãã¿ã¼ã³ã«ãæå³ã®ãªããã¿ã¼ã³ãæ¿å ¥ãã2ã¤ã®é¸æè¢ã2è¡ - ç®ã«ç½®ãã¦ãã¾ãã + æåã®é¨åã¯ããªãã·ã§ã³ã®å·¦æ¬å¼§ã«ããããããã®æåãããå ´ + åã«ãæåã®é¨åæååã¨ãã¦è¨å®ãã¾ãã第2ã®é¨åã¯ãæ¬å¼§ä»¥å¤ + ã®ä¸ã¤ä»¥ä¸ã®æåã«ããããã¾ãã第3ã®é¨åã¯ãæåã®æ¬å¼§ã«ãã + ããããã©ããã調ã¹ãæ¡ä»¶ä»ããµããã¿ã¼ã³ã§ããããããã¦ãã + å ´åãã¤ã¾ãã対象ãå·¦æ¬å¼§ã§å§ã¾ã£ã¦ããå ´åãæ¡ä»¶ã¯&true;㨠+ ãªããyes-pattern ãå®è¡ããã峿¬å¼§ãå¿ è¦ã¨ãªãã¾ãã + ããã§ãªãå ´åãno-pattern ãåå¨ããªãããããµããã¿ã¼ã³ã¯ + ä½ã«ãããããã¾ãããè¨ããããã¨ããã®ãã¿ã¼ã³ã¯ãæ¬å¼§ãªã + ã®ä¸¦ã³ã«ããããããªãã·ã§ã³ã§æ¬å¼§ã§å²ã¾ãã並ã³ã«ããããã¾ãã + + æ¡ä»¶ãæ°åã®ä¸¦ã³ã®å ´åãè¨æã¨ãªãã¾ããè¯å®ãããã¯å¦å®ã® + åæ¹ã¾ãã¯å¾æ¹è¨æã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã + ãã®ãã¿ã¼ã³ã«ãæå³ã®ãªããã¿ã¼ã³ãæ¿å ¥ãã2ã¤ã®é¸æè¢ã2è¡ + ç®ã«ç½®ãã¦ãã¾ãã (?(?=[^a-z]*[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) - æ¡ä»¶ã¯ãè¯å®å¾æ¹è¨æã§ãããè±å以å¤ã®æåã®ä¸¦ã³ããã®å¾ã« - è±åãç¶ããã®ã«ããããã¾ããè¨ããããã¨ã対象æååã«å°ãª - ãã¨ãæåãä¸ã¤ãããã©ããã調ã¹ã¾ããæåãã¿ã¤ããã¨ã - æ¤ç´¢å¯¾è±¡ã¯æåã®é¸æè¢ã«å¯¾ãã¦ããããã¾ããã¿ã¤ãããªãå ´å - ã¯ã2çªç®ã«ããããã¾ãããã®ãã¿ã¼ã³ã¯ã2ã¤ã®å½¢å¼ dd-aaa-dd - ã¾ã㯠dd-dd-dd ã®ã©ã¡ããã®æååã«ããããã¾ãããã ãã - aaa ã¯è±åãdd ã¯æ°åã§ãã - + æ¡ä»¶ã¯ãè¯å®å¾æ¹è¨æã§ãããè±å以å¤ã®æåã®ä¸¦ã³ããã®å¾ã« + è±åãç¶ããã®ã«ããããã¾ããè¨ããããã¨ã対象æååã«å°ãª + ãã¨ãæåãä¸ã¤ãããã©ããã調ã¹ã¾ããæåãã¿ã¤ããã¨ã + æ¤ç´¢å¯¾è±¡ã¯æåã®é¸æè¢ã«å¯¾ãã¦ããããã¾ããã¿ã¤ãããªãå ´å + ã¯ã2çªç®ã«ããããã¾ãããã®ãã¿ã¼ã³ã¯ã2ã¤ã®å½¢å¼ dd-aaa-dd + ã¾ã㯠dd-dd-dd ã®ã©ã¡ããã®æååã«ããããã¾ãããã ãã + aaa ã¯è±åãdd ã¯æ°åã§ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.comments"> <title>ã³ã¡ã³ã</title> <literallayout> - (?# ã¨ãã並ã³ã¯ãéå§ãæå®ãã¾ããã³ã¡ã³ãã¯ã次ã®å³æ¬å¼§ã¾ã§ - ç¶ãã¾ããæ¬å¼§ã®ãã¹ãã¯è¨±å¯ããã¾ãããã³ã¡ã³ãä¸ã®æåã¯ã - ãã¿ã¼ã³ãããã³ã°ã«ã¯å ¨ãé¢ä¿ãã¾ããã - - PCRE_EXTENDED ãªãã·ã§ã³ãè¨å®ããã¦ããå ´åãæåã¯ã©ã¹ã®å¤ - ã«ããã¨ã¹ã±ã¼ãããã¦ããªã # æåã¯ãã³ã¡ã³ããæå®ãã¾ãã - ã³ã¡ã³ãã¯ããã¿ã¼ã³ä¸ã®æ¬¡ã®æ¹è¡æåã¾ã§ç¶ãã¾ãã - + (?# ã¨ãã並ã³ã¯ãéå§ãæå®ãã¾ããã³ã¡ã³ãã¯ã次ã®å³æ¬å¼§ã¾ã§ + ç¶ãã¾ããæ¬å¼§ã®ãã¹ãã¯è¨±å¯ããã¾ãããã³ã¡ã³ãä¸ã®æåã¯ã + ãã¿ã¼ã³ãããã³ã°ã«ã¯å ¨ãé¢ä¿ãã¾ããã + + PCRE_EXTENDED ãªãã·ã§ã³ãè¨å®ããã¦ããå ´åãæåã¯ã©ã¹ã®å¤ + ã«ããã¨ã¹ã±ã¼ãããã¦ããªã # æåã¯ãã³ã¡ã³ããæå®ãã¾ãã + ã³ã¡ã³ãã¯ããã¿ã¼ã³ä¸ã®æ¬¡ã®æ¹è¡æåã¾ã§ç¶ãã¾ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.recursive"> <title>å帰çãã¿ã¼ã³</title> <literallayout> - ç¡å¶éã®ãã¹ãã許容ããæ¬å¼§ãå«ãæååã«ããããè¡ãåé¡ãèã - ã¦ã¿ã¾ããããå帰ã使ç¨ããªãå ´åãå®ç¾å¯è½ãªæè¯ã®æ¹æ³ã¯ãä½ã - ãã®åºå®ããæ·±ãã®ãã¹ãã¾ã§ããããè¡ããã¿ã¼ã³ã使ç¨ãããã¨ã§ - ããããã§ã¯ãä»»æã®æ·±ãã®ãã¹ããå¦çãããã¨ã¯ã§ãã¾ãããPerl - 5.6ã§ã¯ã(ä»ã®æ©è½ã¨å ±ã«)æ£è¦è¡¨ç¾ã§å帰ãè¡ããã¨ãå¯è½ã«ããå®é¨ - çãªæ©è½ããµãã¼ãããã¦ãã¾ããå°ç¨ã®ã·ã¼ã±ã³ã¹ (?R)ãå帰ãæå® - ããããã«ãµãã¼ãããã¦ãã¾ãããã®PCREãã¿ã¼ã³ã«ãããã®æ¬å¼§ã® - åé¡ã¯æ¬¡ã®ããã«è§£æ±ºããã¾ãã(空ç½ãç¡è¦ããããã«PCRE_EXTENDED - ãªãã·ã§ã³ãè¨å®ããã¦ããã¨ä»®å®ãã¾ã) + ç¡å¶éã®ãã¹ãã許容ããæ¬å¼§ãå«ãæååã«ããããè¡ãåé¡ãèã + ã¦ã¿ã¾ããããå帰ã使ç¨ããªãå ´åãå®ç¾å¯è½ãªæè¯ã®æ¹æ³ã¯ãä½ã + ãã®åºå®ããæ·±ãã®ãã¹ãã¾ã§ããããè¡ããã¿ã¼ã³ã使ç¨ãããã¨ã§ + ããããã§ã¯ãä»»æã®æ·±ãã®ãã¹ããå¦çãããã¨ã¯ã§ãã¾ãããPerl + 5.6ã§ã¯ã(ä»ã®æ©è½ã¨å ±ã«)æ£è¦è¡¨ç¾ã§å帰ãè¡ããã¨ãå¯è½ã«ããå®é¨ + çãªæ©è½ããµãã¼ãããã¦ãã¾ããå°ç¨ã®ã·ã¼ã±ã³ã¹ (?R)ãå帰ãæå® + ããããã«ãµãã¼ãããã¦ãã¾ãããã®PCREãã¿ã¼ã³ã«ãããã®æ¬å¼§ã® + åé¡ã¯æ¬¡ã®ããã«è§£æ±ºããã¾ãã(空ç½ãç¡è¦ããããã«<link + linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ãªãã·ã§ã³ + ãè¨å®ããã¦ããã¨ä»®å®ãã¾ã) \( ( (?>[^()]+) | (?R) )* \) - ã¾ãããã®ãã¿ã¼ã³ã¯éãæ¬å¼§ã«ããããã¾ããç¶ãã¦ãæ¬å¼§ä»¥å¤ã®ä¸¦ - ã³ã¾ãã¯ãã¿ã¼ã³èªä½ã«å帰çã«ãããããé¨åæååã«ä½åã§ããã - ããã¾ããæå¾ã«éãæ¬å¼§ã«ããããã¾ãã + ã¾ãããã®ãã¿ã¼ã³ã¯éãæ¬å¼§ã«ããããã¾ããç¶ãã¦ãæ¬å¼§ä»¥å¤ã®ä¸¦ + ã³ã¾ãã¯ãã¿ã¼ã³èªä½ã«å帰çã«ãããããé¨åæååã«ä½åã§ããã + ããã¾ããæå¾ã«éãæ¬å¼§ã«ããããã¾ãã ãã®ãã¿ã¼ã³ä¾ã«ã¯ããã¹ãããç¡å¶éã®å復ãå«ã¾ãã¦ããããã®ã ãããããããªãæååã®ãã¿ã¼ã³ãé©ç¨ããéã«æ¬å¼§ä»¥å¤ã®æååã« @@ -1955,15 +2433,15 @@ 次ã®ããã«æ¬å¼§ã追å ããã¨ã \( ( ( (?>[^()]+) | (?R) )* ) \) - ^ ^ - ^ ^ åå¾ãããæååã¯ã"ab(cd)ef" 㨠- ãªããæä¸ä½ã¬ãã«ã®æ¬å¼§ã®ä¸èº«ã¨ãªãã¾ããä¸ã¤ã®ãã¿ã¼ã³å ã« - 15以ä¸ã®åå¾ç¨æ¬å¼§ãããå ´åãPCREã¯å帰ã®éã®ãã¼ã¿ä¿åç¨ã« - 追å ã®ã¡ã¢ãªãåå¾ããå¿ è¦ãããã¾ããããã¯ãpcre_malloc ã« - ãã確ä¿ãããå¾ã§ pcre_free ã«ããéæ¾ããã¾ããã¡ã¢ãªãå - å¾ã§ããªãå ´åãã¡ã¢ãªä¸è¶³ã¨ã©ã¼ãå帰ã®å å´ããåºåããææ®µ - ã¯ãªããããæåã®15åã®åå¾ç¨æ¬å¼§ã«ã¤ãã¦ã®ã¿ãã¼ã¿ãä¿åã - ãã¾ãã + + åå¾ãããæååã¯ã"ab(cd)ef" 㨠+ ãªããæä¸ä½ã¬ãã«ã®æ¬å¼§ã®ä¸èº«ã¨ãªãã¾ããä¸ã¤ã®ãã¿ã¼ã³å ã« + 15以ä¸ã®åå¾ç¨æ¬å¼§ãããå ´åãPCREã¯å帰ã®éã®ãã¼ã¿ä¿åç¨ã« + 追å ã®ã¡ã¢ãªãåå¾ããå¿ è¦ãããã¾ããããã¯ãpcre_malloc ã« + ãã確ä¿ãããå¾ã§ pcre_free ã«ããéæ¾ããã¾ããã¡ã¢ãªãå + å¾ã§ããªãå ´åãã¡ã¢ãªä¸è¶³ã¨ã©ã¼ãå帰ã®å å´ããåºåããææ®µ + ã¯ãªããããæåã®15åã®åå¾ç¨æ¬å¼§ã«ã¤ãã¦ã®ã¿ãã¼ã¿ãä¿åã + ãã¾ãã </literallayout> </refsect2> @@ -1977,11 +2455,13 @@ æ§è½åä¸ã®ããã«æ£è¦è¡¨ç¾ã®æé©åã«é¢ããå¤ãã®è°è«ã è¨è¿°ããã¦ãã¾ãã - ãã¿ã¼ã³ã .* ã§å§ã¾ããPCRE_DOTALL ãªãã·ã§ã³ãè¨å®ããã¦ãã - å ´åã対象æååã®å§ç«¯ã§ããã¾ã£ã¡ã§ããªãããããã¿ã¼ã³ã¯ - PCRE ã«ããæé»ã®ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã - ããããPCRE_DOTALL ãè¨å®ããã¦ããªãå ´åãã¡ã¿æå . ã - æ¹è¡ã«ãããããªãã®ã§ãPCREã¯ãã®æé©åãè¡ãã¾ããã + ãã¿ã¼ã³ã .* ã§å§ã¾ãã<link + linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãªãã·ã§ã³ãè¨ + å®ããã¦ããå ´åã対象æååã®å§ç«¯ã§ããã¾ã£ã¡ã§ããªãããããã¿ã¼ + ã³ã¯PCREã«ããæé»ã®ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã + ãããã<link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link> + ãè¨å®ããã¦ããªãå ´åãã¡ã¿æå . ãæ¹è¡ã«ãããããªãã®ã§ãPCRE + ã¯ãã®æé©åãè¡ãã¾ããã 対象æååãæ¹è¡ãå«ãå ´åããã¿ã¼ã³ã¯æååã®å§ç«¯ããã§ã¯ãªã åæ¹è¡ã®ç´å¾ã®æåãããããããå¯è½æ§ãããã¾ããä¾ãã°ã ãã¿ã¼ã³ @@ -1995,8 +2475,9 @@ éå§ããå¿ è¦ãããã¾ãã ãã®ãããªãã¿ã¼ã³ãæ¹è¡ãå«ã¾ãªã対象æååã«ä½¿ç¨ããå ´åã - PCRE_DOTALL ãè¨å®ããããã¢ã³ã«ã¼ä»ãã§ãããã¨ãé½ã«ç¤ºããã - ã«ãã¿ã¼ã³ã ^.* ã§éå§ãããã¨ã«ããæé«ã®æ§è½ãå¾ããã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãè¨å®ã + ãããã¢ã³ã«ã¼ä»ãã§ãããã¨ãé½ã«ç¤ºãããã«ãã¿ã¼ã³ã ^.* ã§éå§ + ãããã¨ã«ããæé«ã®æ§è½ãå¾ããã¾ãã ããã«ãããPCRE ã対象æååã®æ¹è¡ãæ¢ããããã§åã¹ã¿ã¼ã ãããã¨ã鲿¢ãã¾ãã @@ -2006,29 +2487,29 @@ (a+)* - ããã¯ã33éãã®ç°ãªã£ãæ¹æ³ã§ã"aaaa"ã«ããããã¾ãããã®æ°ã¯ã - æååãé·ããªãã«ã¤ãã¦æ¥æ¿ã«å¢å¤§ãã¾ãã(* å復ã¯ã0ã1ã2ã3ã - 4åããããã0以å¤ã®åã ã®ã±ã¼ã¹ã§ã+å復ã¯ç°ãªã£ãåæ°åãããã - ã¾ã) ãã¿ã¼ã³ã®æ®ãã«ãããå ¨ä½ã失æãããããªãã¿ã¼ã³ã§ããå ´ - åãPCREã¯åºæ¬çã«å ¨ã¦ã®å¯è½æ§ããã鏿è¢ã調ã¹ããããé常ã«é· - ãæéããããã¾ãã + ããã¯ã33éãã®ç°ãªã£ãæ¹æ³ã§ã"aaaa"ã«ããããã¾ãããã®æ°ã¯ã + æååãé·ããªãã«ã¤ãã¦æ¥æ¿ã«å¢å¤§ãã¾ãã(* å復ã¯ã0ã1ã2ã3ã + 4åããããã0以å¤ã®åã ã®ã±ã¼ã¹ã§ã+å復ã¯ç°ãªã£ãåæ°åãããã + ã¾ã) ãã¿ã¼ã³ã®æ®ãã«ãããå ¨ä½ã失æãããããªãã¿ã¼ã³ã§ããå ´ + åãPCREã¯åºæ¬çã«å ¨ã¦ã®å¯è½æ§ããã鏿è¢ã調ã¹ããããé常ã«é· + ãæéããããã¾ãã - 次ã®ããã«æåãªãã©ã«ãå¾ã«ãããããªããç°¡åãªå ´åã«ã¯æé©åã - å¯è½ã§ãã + 次ã®ããã«æåãªãã©ã«ãå¾ã«ãããããªããç°¡åãªå ´åã«ã¯æé©åã + å¯è½ã§ãã (a+)*b - æ¨æºã®ãããæé ã«çæããåã«ãPCREã¯å¯¾è±¡æååã®å¾ã®æ¹ã«"b"ãã - ããã©ããã調ã¹ã¾ããããããªãå ´åã«ã¯ãç´ã¡ã«ãããã¯å¤±æãã¾ - ãããããããªãã©ã«ãå¾ã«ãªãå ´åã«ã¯ããã®æé©åã使ç¨ããã㨠- ã¯ã§ãã¾ããã以ä¸ã®ãã¿ã¼ã³ã¨ä¸ã®ãã¿ã¼ã³ã®åä½ã®å·®ç°ãæ¯è¼ã㦠- ã¿ã¾ãããã + æ¨æºã®ãããæé ã«çæããåã«ãPCREã¯å¯¾è±¡æååã®å¾ã®æ¹ã«"b"ãã + ããã©ããã調ã¹ã¾ããããããªãå ´åã«ã¯ãç´ã¡ã«ãããã¯å¤±æãã¾ + ãããããããªãã©ã«ãå¾ã«ãªãå ´åã«ã¯ããã®æé©åã使ç¨ããã㨠+ ã¯ã§ãã¾ããã以ä¸ã®ãã¿ã¼ã³ã¨ä¸ã®ãã¿ã¼ã³ã®åä½ã®å·®ç°ãæ¯è¼ã㦠+ ã¿ã¾ãããã (a+)*\d - åè ã¯ãå ¨ä½ã "a" æåã§ããè¡ã«é©ç¨ãããå ´åã«ã»ã¼ç¬éçã«å¤±æ - ã¨å¤å®ãã¾ãã䏿¹ãå¾è ã§ã¯ãããã20æåããé·ãæååã§ã¯ã㪠- ãã®æéããããã¾ãã + åè ã¯ãå ¨ä½ã "a" æåã§ããè¡ã«é©ç¨ãããå ´åã«ã»ã¼ç¬éçã«å¤±æ + ã¨å¤å®ãã¾ãã䏿¹ãå¾è ã§ã¯ãããã20æåããé·ãæååã§ã¯ã㪠+ ãã®æéããããã¾ãã </literallayout> </refsect2> </refsect1> Index: phpdoc/ja/functions/pdf.xml diff -u phpdoc/ja/functions/pdf.xml:1.29 phpdoc/ja/functions/pdf.xml:1.30 --- phpdoc/ja/functions/pdf.xml:1.29 Sun Jan 6 22:23:28 2002 +++ phpdoc/ja/functions/pdf.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.30 $ --> <reference id="ref.pdf"> <title>pdf 颿°</title> <titleabbrev>pdf</titleabbrev> Index: phpdoc/ja/functions/pfpro.xml diff -u phpdoc/ja/functions/pfpro.xml:1.7 phpdoc/ja/functions/pfpro.xml:1.8 --- phpdoc/ja/functions/pfpro.xml:1.7 Wed Dec 12 15:53:33 2001 +++ phpdoc/ja/functions/pfpro.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <reference id="ref.pfpro"> <title>Verisign Payflow Pro 颿°</title> <titleabbrev>Verisign Payflow Pro</titleabbrev> @@ -110,7 +111,6 @@ <funcprototype> <funcdef>array <function>pfpro_process</function></funcdef> <paramdef>array <parameter>parameters</parameter></paramdef> - <paramdef>string <parameter> <replaceable><optional>address</optional></replaceable> @@ -193,7 +193,8 @@ <example> <title>Payflow Proã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php pfpro_init(); @@ -224,6 +225,7 @@ pfpro_cleanup(); ?> +]]> </programlisting> </example> </refsect1> @@ -302,11 +304,12 @@ <example> <title>Payflow Pro raw ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php pfpro_init(); -$response = pfpro_process("USER=mylogin&PWD[5]=m&ndy&TRXTYPE=S&TENDER=C&AMT=1.50&ACCT=4111111111111111&EXPDATE=0904"); +$response = pfpro_process("USER=mylogin&PWD[5]=m&ndy&TRXTYPE=S&TENDER=C&AMT=1.50&ACCT=4111111111111111&EXPDATE=0904"); if (!$response) { die("Couldn't establish link to Verisign.\n"); @@ -317,11 +320,11 @@ pfpro_cleanup(); ?> +]]> </programlisting> </example> </refsect1> </refentry> - <refentry id="function.pfpro-version"> <refnamediv> Index: phpdoc/ja/functions/pgsql.xml diff -u phpdoc/ja/functions/pgsql.xml:1.31 phpdoc/ja/functions/pgsql.xml:1.32 --- phpdoc/ja/functions/pgsql.xml:1.31 Wed Dec 19 10:34:51 2001 +++ phpdoc/ja/functions/pgsql.xml Sat Jan 26 10:38:34 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.31 $ --> +<!-- $Revision: 1.32 $ --> <reference id="ref.pgsql"> <title>PostgreSQL 颿°</title> <titleabbrev>PostgreSQL</titleabbrev> @@ -20,6 +20,37 @@ ä½åãã®ãªãªã¼ã¹ã§ã使ç¨å¯è½ã§ãããå°æ¥çã«åé¤ãããå¯è½æ§ãã ãã¾ããCVSãã¼ã¸ã§ã³ã«ã¯ãæ°ãã颿°åãä»ãããã¦ãã¾ãã </para> + <example> + <title>颿°åã®å¤æ´</title> + <programlisting role="php"> +<![CDATA[ +OLD NAME NEW NAME +pg_exec pg_query +getlastoid pg_last_oid +pg_cmdtuples pg_affected_rows +pg_errormessage pg_last_error +pg_numrows pg_num_rows +pg_numfields pg_num_fields +pg_fieldname pg_field_name +pg_fieldsize pg_field_size +pg_fieldtype pg_field_type +pg_fieldnum pg_field_num +pg_fieldprtlen pg_field_prtlen +pg_fieldisnull pg_field_is_null +pg_freeresult pg_free_result +pg_result pg_fetch_result +pg_loreadall pg_lo_read_all +pg_locreate pg_lo_create +pg_lounlink pg_lo_unlink +pg_loopen pg_lo_open +pg_loclose pg_lo_close +pg_loread pg_lo_read +pg_lowrite pg_lo_write +pg_loimport pg_lo_import +pg_loexport pg_lo_export +]]> + </programlisting> + </example> <para> 徿¥ã®pg_connect()/pg_pconnect() ã¯ãå°æ¥çã«åææ¥ç¶æ©è½ããµãã¼ ãããããã«éå»ã®ãã®ã¨ãªãå¯è½æ§ãããã¾ãã @@ -398,22 +429,40 @@ </funcprototype> </funcsynopsis> <para> - ã¯ã¨ãªã¼ã«å¤±æããããconnectionãæå¹ãªæ¥ç¶IDã§ãªãå ´åã¯&false;ã - è¿ãã¾ããconnectionãæå¹ãªå¤ã§ããã°ã + <function>pg_exec</function>ã¯ãã¯ã¨ãªãå®è¡ã§ããå ´åãã¯ã¨ãªçµ + æãªã½ã¼ã¹ãè¿ãã¾ããã¯ã¨ãªã¼ã«å¤±æããããconnectionãæå¹ãªæ¥ + ç¶IDã§ãªãå ´åã¯&false;ãè¿ãã¾ããconnectionãæå¹ãªå¤ã§ããã°ã <function>pg_errormessage</function>颿°ã«ããã¨ã©ã¼ã®è©³ç´° ãå¾ããã¨ãã§ãã¾ãã<function>pg_exec</function>颿°ã¯ãæ¥ç¶IDã«ãã æå®ãããPostgreSQLãã¼ã¿ãã¼ã¹ã«å¯¾ãã¦SQLã¹ãã¼ãã¡ã³ããéä¿¡ãã¾ãã - connectionã¯<function>pg_connect</function>ã«ããè¿ãããæå¹ãªID - ã§ãªããã°ãªãã¾ããããã®é¢æ°ã®è¿ãå¤ã¯ã¤ã³ããã¯ã¹å¤ã§ããã - ãã®ä»ã®PostgreSQL颿°ããçµæãã¢ã¯ã»ã¹ããéã«ä½¿ããã¾ãã + connectionã¯<function>pg_connect</function>ã¾ã㯠+ <function>pg_pconnect</function>ã«ããè¿ãããæå¹ãªIDã§ãªããã° + ãªãã¾ããããã®é¢æ°ã®è¿ãå¤ã¯ã¯ã¨ãªæ¬ 課ãªã½ã¼ã¹ã§ããã + <function>pg_fetch_array</function>ã®ãããªãã®ä»ã®PostgreSQL颿° + ãçµæã«ã¢ã¯ã»ã¹ããéã«ä½¿ããã¾ãã <note> <simpara> - PHP/FIã§ã¯ãã¯ã¨ãªã¼ããã¼ã¿ãè¿ããã¨ãæå¾ ãããªãå ´å - (ãã¨ãã°INSERTãUPDATE)ã¯1ãè¿ããã¾ãä½ãè¿ããªãã£ãSELECTã® - å ´åã§ã1ãã大ããªå¤ãè¿ãã¾ããPHPã§ã¯ãã®ãããªä»®å®ã¯è¡ãã¾ããã + <parameter>connection</parameter>ã¯ã + <function>pg_exec</function>ã®ãªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã§ãã + <parameter>connection</parameter>ã使ç¨ãããå ´åãããã©ã«ãã® + æ¥ç¶ã使ç¨ããã¾ããããã©ã«ãã®æ¥ç¶ã¯ã + <function>pg_connect</function>ã¾ã㯠+ <function>pg_pconnect</function>ã«ãã使ãããç´è¿ã®æ¥ç¶ã§ãã + </simpara> + <simpara> + <parameter>connection</parameter>ã¯çç¥ã§ãã¾ãããã¹ã¯ãªããã® + ãã°ãçºè¦ãã«ãããªããããçç¥ã¯æ¨å¥¨ããã¾ããã </simpara> </note> </para> + <para> + <function>pg_connect</function>, + <function>pg_pconnect</function>, + <function>pg_fetch_array</function>, + <function>pg_fetch_object</function>, + <function>pg_numrows</function>, + and <function>pg_cmdtuples</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> @@ -428,14 +477,17 @@ <funcprototype> <funcdef>array <function>pg_fetch_array</function></funcdef> <paramdef>resource <parameter>result</parameter></paramdef> - <paramdef>int <parameter>row</parameter></paramdef> + <paramdef>int + <parameter><optional>row</optional></parameter> + </paramdef> <paramdef>int <parameter><optional>result_type</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> - <para> - è¿ãå¤: åå¾ãããè¡ãä¿æããé åãè¡ããããªãå ´åã¯&false;ã + <para> + <function>pg_fetch_array</function>ã¯ãåå¾ãããè¡(ã¿ãã«/ã¬ã³ã¼ + ã)ãä¿æããé åãè¿ãã¾ããè¡ããããªãå ´åã¯&false;ãè¿ãã¾ãã </para> <para> <function>pg_fetch_array</function>ã¯æ¡å¼µçã® @@ -444,9 +496,18 @@ ãã£ã¼ã«ãåããã¼ã¨ãã¦ãã¼ã¿ã飿³ã¤ã³ããã¯ã¹ã«ãä¿åãã¾ãã </para> <para> - <function>pg_fetch_array</function>ã® - 3çªç®ã®å¼æ°(ãªãã·ã§ã³)<parameter>result_type</parameter>㯠- 宿°ã§ãããPGSQL_ASSOCãPGSQL_NUMãPGSQL_BOTHã®ã©ããã¨ãªãã¾ãã + <parameter>row</parameter>ã¯ãåå¾ããè¡(ã¬ã³ã¼ã)çªå·ã§ããæå + ã®è¡ã¯0ã§ãã + </para> + <para> + <parameter>result_type</parameter>ã¯ãè¿ãå¤ã®åæåæ¹æ³ãå¶å¾¡ã + ããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã§ãã<parameter>result_type</parameter> + ã¯å®æ°ã§ãããæ¬¡ã®å¤ã®ã©ããã¨ãããã¨ãå¯è½ã§ãã: PGSQL_ASSOC, + PGSQL_NUM, and PGSQL_BOTHã + <function>pg_fetch_array</function>ã¯ãPGSQL_ASSOCã®ãã¼ã¨ãã¦ãã£ã¼ + ã«ãåããã飿³é åãè¿ãã¾ããPGSQL_NUMããã¼ã¨ããå ´åã¯ãã£ã¼ + ã«ãæ·»åãPGSQL_BOTHããã¼ã¨ããå ´åã¯ãã£ã¼ã«ãå/æ·»åã§ããããã© + ã«ãã¯ãPGSQL_BOTHã§ãã <note> <para> <parameter>result_type</parameter>ã¯PHP4.0ã§è¿½å ããã¾ããã @@ -460,12 +521,15 @@ 極端ã«é ããªãããã§ã¯ãªãã¨ãããã¨ãããããã¾ãã </para> <para> - æ´ã«è©³ç´°ãªæ å ±ã¯ã<function>pg_fetch_row</function>ãåç §ä¸ããã + <function>pg_fetch_row</function>ã + <function>pg_fetch_object</function>ã + <function>pg_result</function>ãåç §ä¸ããã </para> - <example> - <title>PostgreSQLã«ããé åã®åå¾</title> - <programlisting role="php"> - <![CDATA[ + <para> + <example> + <title>PostgreSQLã«ããé åã®åå¾</title> + <programlisting role="php"> +<![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { @@ -486,8 +550,14 @@ echo $arr["author"] . " <- array\n"; ?> ]]> - </programlisting> - </example> + </programlisting> + </example> + </para> + <note> + <para> + 4.1.0以éã<parameter>row</parameter>ã¯ãªãã·ã§ã³ã§ãã + </para> + </note> </refsect1> </refentry> @@ -509,20 +579,28 @@ </funcprototype> </funcsynopsis> <para> - è¿ãå¤: åå¾ããè¡ã«å¯¾å¿ããããããã£ãæãããªãã¸ã§ã¯ãã - è¡ããããªãå ´åã¯&false;ã + <function>pg_fetch_object</function>ã¯ãåå¾ããè¡ã«å¯¾å¿ãããã + ããã£ãæãããªãã¸ã§ã¯ããè¿ãã¾ãããã®é¢æ°ã¯ãè¡ããããªãå ´ + åã¾ãã¯ã¨ã©ã¼ã«ã¯&false;ãè¿ãã¾ãã </para> <para> - <function>pg_fetch_object</function>ã¯<function>pg_fetch_array</function> - ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ããã«ãªãã¸ã§ã¯ããè¿ããã¨ããéããããã¾ãã - 鿥çã«ããã®ãã¨ã¯ãã¼ã¿ããªãã»ããã§ã¯ãªã - ãã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ã¢ã¯ã»ã¹å¯è½ã§ãããã¨ãæå³ãã¾ãã - (æ°åã¯ããããã£åã¨ãã¦ä½¿ç¨ã§ãã¾ããã) + <function>pg_fetch_object</function>㯠+ <function>pg_fetch_array</function>ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ããã« + ãªãã¸ã§ã¯ããè¿ããã¨ããéããããã¾ãã鿥çã«ããã®ãã¨ã¯ãã¼ + ã¿ããªãã»ããã§ã¯ãªããã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ã¢ã¯ã»ã¹å¯è½ã§ãã + ãã¨ãæå³ãã¾ãã(æ°åã¯ããããã£åã¨ãã¦ä½¿ç¨ã§ãã¾ããã) + </para> + <para> + <parameter>result_type</parameter>ã¯ãè¿ãå¤ã®åæåæ¹æ³ãå¶å¾¡ã + ããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã§ãã<parameter>result_type</parameter> + ã¯å®æ°ã§ãããæ¬¡ã®å¤ã®ã©ããã¨ãããã¨ãå¯è½ã§ãã: PGSQL_ASSOC, + PGSQL_NUM, and PGSQL_BOTHã + <function>pg_fetch_array</function>ã¯ãPGSQL_ASSOCã®ãã¼ã¨ãã¦ãã£ã¼ + ã«ãåããã飿³é åãè¿ãã¾ããPGSQL_NUMããã¼ã¨ããå ´åã¯ãã£ã¼ + ã«ãæ·»åãPGSQL_BOTHããã¼ã¨ããå ´åã¯ãã£ã¼ã«ãå/æ·»åã§ããããã© + ã«ãã¯ãPGSQL_BOTHã§ãã </para> <para> - <function>pg_fetch_array</function>ã®3çªç®ã®å¼æ°(ãªãã·ã§ã³) - <parameter>result_type</parameter>ã¯å®æ°ã§ããã - PGSQL_ASSOCãPGSQL_NUMãPGSQL_BOTHã®ã©ããã¨ãªãã¾ãã <note> <para> <parameter>result_type</parameter>ã¯PHP4.0ã§è¿½å ããã¾ããã @@ -535,7 +613,8 @@ (éãã¯ãããã§ã) </para> <para> - <function>pg_fetch_array</function>ã<function>pg_fetch_row</function> + <function>pg_exec</function>, <function>pg_fetch_array</function>, + <function>pg_fetch_row</function>, <function>pg_result</function> ãåç §ä¸ããã <example> <title>Postgres ã«ãããªãã¸ã§ã¯ããåå¾ãã</title> @@ -584,6 +663,11 @@ </programlisting> </example> </para> + <note> + <para> + 4.1.0以éã<parameter>row</parameter>ã¯ãªãã·ã§ã³ã§ãã + </para> + </note> </refsect1> </refentry> @@ -601,15 +685,17 @@ <paramdef>int <parameter>row</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - è¿ãå¤: åå¾ãããè¡ãæããé åãè¡ããããªãå ´åã«&false;ã - </para> <para> <function>pg_fetch_row</function>ã¯æå®ããçµæIDãæãçµæãã - 1è¡åã®ãã¼ã¿ãåå¾ãã¾ããè¡ã¯é åã¨ãã¦è¿ããã¾ãã + 1è¡åã®ãã¼ã¿ãåå¾ãã¾ããè¡(ã¬ã³ã¼ã)ã¯é åã¨ãã¦è¿ããã¾ãã åçµæã«ã©ã ã¯ããªãã»ããå¤0ããå§ã¾ãé åã«ä¿åããã¾ãã </para> + <para> + åå¾ããè¡ã«å¯¾å¿ããé åãè¿ãã¾ããè¡ããããªãå ´åã&false;ãè¿ + ãã¾ãã + </para> <para> + <function>pg_exec</function>, <function>pg_fetch_array</function>, <function>pg_fetch_object</function>, <function>pg_result</function> ãåç §ä¸ããã @@ -648,12 +734,17 @@ </programlisting> </example> </para> + <note> + <para> + 4.1.0以éã<parameter>row</parameter>ã¯ãªãã·ã§ã³ã¨ãªãã¾ããã + </para> + </note> </refsect1> </refentry> <refentry id="function.pg-fieldisnull"> <refnamediv> - <refname>pg_FieldIsNull</refname> + <refname>pg_fieldisnull</refname> <refpurpose>ãã£ã¼ã«ãã&null;ãã©ãã調ã¹ã</refpurpose> </refnamediv> <refsect1> @@ -667,9 +758,10 @@ </funcprototype> </funcsynopsis> <para> - ãã£ã¼ã«ãã&null;ãã©ãã調ã¹ã¾ããrowã§æå®ããè¡ã®ãã£ã¼ã«ãã - &null;ã§ãªãå ´åã¯0ãè¿ãã&null;ã ã£ãå ´åã¯1ãè¿ãã¾ããfieldã¯çªå· - ã¾ãã¯ãã£ã¼ã«ãåã§æå®ãã¾ããrowã®çªå·ä»ãã¯0ããå§ã¾ãã¾ãã + <function>pg_fieldisnull</function>ã¯ããã£ã¼ã«ãã&null;ãã©ãã + 調ã¹ã¾ããrowã§æå®ããè¡ã®ãã£ã¼ã«ãã&null;ã§ãªãå ´åã¯0ãè¿ãã + &null;ã ã£ãå ´åã¯1ãè¿ãã¾ããfieldã¯çªå·ã¾ãã¯ãã£ã¼ã«ãåã§æ + å®ãã¾ããrowã®çªå·ä»ãã¯0ããå§ã¾ãã¾ãã </para> </refsect1> </refentry> @@ -689,9 +781,13 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldname</function>ã¯ãæå®ããPostgreSQLçµæIDã®ä¸ã® - ã«ã©ã çªå·ã«å¯¾å¿ãããã£ã¼ã«ãã®ååãè¿ãã¾ãããã£ã¼ã«ãçªå·ã¯ - 0ããå§ã¾ãã¾ãã + <function>pg_fieldname</function>ã¯ãæå®ããPostgreSQL + <parameter>result</parameter>ãªã½ã¼ã¹ã®æå®ãã + <parameter>field_number</parameter>ã«ãããã£ã¼ã«ãã®ååãè¿ + ãã¾ãããã£ã¼ã«ãçªå·ã¯0ããå§ã¾ãã¾ãã + </para> + <para> + <function>pg_fieldnum</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -711,9 +807,14 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldnum</function>ã¯ãæå®ããPostgreSQLã®çµæIDã®ä¸ã® - ãã£ã¼ã«ãåã«å¯¾å¿ããã«ã©ã çªå·ãè¿ãã¾ãããã£ã¼ã«ãçªå·ã¯0ãã - å§ã¾ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã«-1ãè¿ãã¾ãã + <function>pg_fieldnum</function>ã¯ãæå®ããPostgreSQL + <parameter>result</parameter>ãªã½ã¼ã¹ã® + <parameter>field_name</parameter>ã«å¯¾å¿ããã«ã©ã (ã¹ããã)çªå·ã + è¿ãã¾ãããã£ã¼ã«ãçªå·ã¯0ããå§ã¾ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´ + åã«-1ãè¿ãã¾ãã + </para> + <para> + <function>pg_fieldname</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -734,10 +835,13 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldprtlen</function>ã¯ãPostgreSQLã®çµæã® - æå®ããå¤ã«é¢ãã¦å®éã«è¡¨ç¤ºããå ´åã®é·ã(æåã®æ°)ãè¿ãã¾ãã - è¡çªå·(row_number)ã¯0ããå§ã¾ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã«-1ã - è¿ãã¾ãã + <function>pg_fieldprtlen</function>ã¯ãPostgreSQLã® + <parameter>result</parameter>ã®æå®ããå¤ã«é¢ãã¦å®éã«è¡¨ç¤ºããå ´ + åã®é·ã(æåã®æ°)ãè¿ãã¾ããè¡çªå·(row_number)ã¯0ããå§ã¾ãã¾ãã + ãã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã«-1ãè¿ãã¾ãã + </para> + <para> + <function>pg_fieldsize</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -765,6 +869,10 @@ ãã£ã¼ã«ããµã¤ãºã-1ã®å ´åããã®é ç®ã¯å¯å¤é·ãã£ã¼ã«ãã§ãããã¨ã 示ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã¯&false;ãè¿ãã¾ãã </para> + <para> + <function>pg_fieldlen</function>ããã³ + <function>pg_fieldtype</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> @@ -785,9 +893,14 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldtype</function>ã¯ãæå®ããPostgreSQLã®çµæã«ããã¦ã - æå®ãã£ã¼ã«ãã®ååãä¿æããæååãè¿ãã¾ãããã£ã¼ã«ãçªå· - (field_number)ã¯0ããå§ã¾ãã¾ãã + <function>pg_fieldtype</function>ã¯ãæå®ããPostgreSQLã® + <parameter>result</parameter>ãªã½ã¼ã¹ã«ããã¦ãæå®ãã + <parameter>field_number</parameter>ã®ååãä¿æããæååãè¿ãã¾ + ãããã£ã¼ã«ãçªå·(field_number)ã¯0ããå§ã¾ãã¾ãã + </para> + <para> + <function>pg_fieldlen</function>ããã³ + <function>pg_fieldname</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -801,18 +914,22 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>pg_freeresult</function></funcdef> + <funcdef>bool <function>pg_freeresult</function></funcdef> <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>pg_freeresult</function>ã¯ãã¹ã¯ãªããå®è¡ä¸ã®ã¡ã¢ãªä½¿ç¨é + <function>pg_freeresult</function>ã¯ãã¹ã¯ãªããå®è¡ä¸ã®ã¡ã¢ãªä½¿ç¨é ãæå¶ãããå ´åã«ã®ã¿ã³ã¼ã«ããå¿ è¦ãããã¾ãããã¹ã¦ã®çµæä¿æç¨ ã¡ã¢ãªã¯ãã¹ã¯ãªãããçµäºããéã«èªåçã«éæ¾ããã¾ãã ããããªããããã®ã¹ã¯ãªããã«ããã¦ããã以ä¸ã®çµæãã¼ã¿ã - å¿ è¦ã¨ããªããã¨ã確å®ã§ããã°ãçµæID(result_id)ã弿°ã¨ã㦠- <function>pg_freeresult</function>ãã³ã¼ã«ãããã¨ãå¯è½ã§ãã - ããã«ãããé¢é£ããã¡ã¢ãªã¯éæ¾ããã¾ãã + å¿ è¦ã¨ããªããã¨ã確å®ã§ããã°ã<parameter>result</parameter>ãªã½ã¼ + ã¹ã弿°ã¨ãã¦<function>pg_freeresult</function>ãã³ã¼ã«ããé¢é£ + ããã¡ã¢ãªãè§£æ¾ãããã¨ãå¯è½ã§ãããã®é¢æ°ã¯æåæã«trueãã¨ã©ã¼ + çºçæã«falseãè¿ãã¾ãã + </para> + <para> + <function>pg_exec</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -833,10 +950,13 @@ <para> <function>pg_getlastoid</function>ã¯ã<function>pg_Exec</function>ã§ å®è¡ãããç´è¿ã®ã³ãã³ããSQLã®INSERTã ã£ãå ´åãæ¿å ¥ãããã¿ãã«ã«å² - ãå½ã¦ãããoid(ãªãã¸ã§ã¯ã ID)ãåãåºãã¾ããæå¹ãªoidãããã°ã - ãã®é¢æ°ã¯æ£ã®æ´æ°ãè¿ãã¾ããã¨ã©ã¼ãèµ·ãã£ããã - <function>pg_exec</function>ã§å®è¡ãããæå¾ã®ã³ãã³ããSQLã® - INSERTã§ãªãã£ãå ´åã¯-1ãè¿ãã¾ãã + ãå½ã¦ããã<varname>oid</varname>ãåãåºãã¾ããæå¹ãª + <varname>oid</varname>ãããã°ããã®é¢æ°ã¯æ£ã®æ´æ°ãè¿ãã¾ãã㨠+ ã©ã¼ãèµ·ãã£ããã<function>pg_exec</function>ã§å®è¡ãããæå¾ã® + ã³ãã³ããSQLã®INSERTã§ãªãã£ãå ´åã¯-1ãè¿ãã¾ãã + </para> + <para> + <function>pg_exec</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -855,8 +975,13 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_host</function>ã¯ãæå®ããPostgreSQLæ¥ç¶IDãæ¥ç¶ãã¦ãã - ãã¹ãã®ååãè¿ãã¾ãã + <function>pg_host</function>ã¯ãæå®ããPostgreSQL + <parameter>connection</parameter>ãªã½ã¼ã¹ãæ¥ç¶ãã¦ãããã¹ãã®å + åãè¿ãã¾ãã + </para> + <para> + <function>pg_connect</function>ããã³ + <function>pg_pconnect</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -1672,7 +1797,7 @@ <refnamediv> <refname>pg_get_result</refname> <refpurpose> - Get asynchronous query result + åæã¯ã¨ãªçµæãåå¾ãã </refpurpose> </refnamediv> <refsect1> @@ -1680,53 +1805,47 @@ <funcsynopsis> <funcprototype> <funcdef>resource <function>pg_get_result</function></funcdef> - <paramdef>resource <parameter><optional>connection</optional></parameter></paramdef> + <paramdef>resource + <parameter><optional>connection</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_get_result</function>ã¯ã + <function>pg_send_query</function>ã§å®è¡ããåæã¯ã¨ãªããçµæãª + ã½ã¼ã¹ãåå¾ãã¾ãã<function>pg_send_query</function>ã¯ãè¤æ°ã® + ã¯ã¨ãªãPostgreSQLãµã¼ãã«éä¿¡ãããã¨ãå¯è½ã§ããã¯ã¨ãªçµæã1 + ã¤ãã¤åå¾ããã«ã¯ã<function>pg_get_result</function>ã使ç¨ãã + ã¾ãããã®é¢æ°ã¯çµæãªã½ã¼ã¹ãè¿ãã¾ããçµæããããªãå ´åã«ã¯ã + &false;ãè¿ãã¾ãã </para> </refsect1> </refentry> - <refentry id='function.pg-request-cancel'> + <refentry id='function.pg-result-status'> <refnamediv> - <refname>pg_request_cancel</refname> + <refname>pg_result_status</refname> <refpurpose> - Cancel request + ã¯ã¨ãªçµæã®ã¹ãã¼ã¿ã¹ãåå¾ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>bool <function>pg_request_cancel</function></funcdef> - <paramdef>resource <parameter><optional>connection</optional></parameter></paramdef> + <funcdef>int <function>pg_result_status</function></funcdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_result_status</function>ã¯ãçµæãªã½ã¼ã¹ã®ã¹ãã¼ã¿ã¹ + ãè¿ãã¾ããè¿ãå¤ã¯ãPGSQL_EMPTY_QUERY, + PGSQL_COMMAND_OK, PGSQL_TUPLES_OK, PGSQL_COPY_TO, + PGSQL_COPY_FROM, PGSQL_BAD_RESPONSE, PGSQL_NONFATAL_ERROR, + PGSQL_FATAL_ERRORã®ã©ããã¨ãªãã¾ãã </para> - </refsect1> - </refentry> - - <refentry id='function.pg-is-busy'> - <refnamediv> - <refname>pg_is_busy</refname> - <refpurpose> - Get connection is busy or not - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>bool <function>pg_is_busy</function></funcdef> - <paramdef>resource <parameter><optional>connection</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> <para> - &warn.undocumented.func; + <function>pgsql_connection_status</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -1744,15 +1863,35 @@ <funcprototype> <funcdef>bool <function>pg_send_query</function></funcdef> <paramdef>resource <parameter>connection</parameter></paramdef> - <paramdef>string <parameter>qeury</parameter></paramdef> + <paramdef>string <parameter>query</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bool <function>pg_send_query</function></funcdef> - <paramdef>string <parameter>qeury</parameter></paramdef> + <paramdef>string <parameter>query</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_send_query</function> send asynchronous query to the + <parameter>connection</parameter>. Unlike + <function>pg_query</function>, it can send multiple query to + PostgreSQL and get the result one by one using + <function>pg_get_result</function>. Script execution is not block + while query is executing. Use + <function>pg_connection_busy</function> to check connection is + busy (i.e. query is executing) Query may be canceled by calling + <function>pg_cancel_query</function>. + </para> + <para> + Although, user can send multiple query at once. User cannot send + multiple query over busy connection. If query is sent while + connection is busy, it waits until last query is finished and + discards all result. + </para> + <para> + See also <function>pg_query</function>, + <function>pg_cancel_query</function>, + <function>pg_get_result</function> and + <function>pg_connection_busy</function> </para> </refsect1> </refentry> @@ -1761,7 +1900,7 @@ <refnamediv> <refname>pg_cancel_query</refname> <refpurpose> - ãªã¯ã¨ã¹ãããã£ã³ã»ã«ãã + åæã¯ã¨ãªãåãæ¶ã </refpurpose> </refnamediv> <refsect1> @@ -1773,7 +1912,14 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_cancel_query</function> cancel asynchronous query sent by + <function>pg_send_query</function>. You cannot cancel query executed by + <function>pg_query</function>. + </para> + <para> + See also <function>pg_send_query</function>, + <function>pg_cancel_result</function> and + <function>pg_connection_busy</function> </para> </refsect1> </refentry> @@ -1782,7 +1928,7 @@ <refnamediv> <refname>pg_connection_busy</refname> <refpurpose> - æ¥ç¶ããã¸ã¼ãã©ããã調ã¹ã + æ¥ç¶ããã¸ã¼ãã©ãã調ã¹ã </refpurpose> </refnamediv> <refsect1> @@ -1794,7 +1940,15 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_connection_busy</function> returns &true; if + connection busy. If connection is busy, previously sent query to + PostgreSQL server is still executing. If + <function>pg_get_result</function> is called, + <function>pg_get_result</function> will block. + </para> + <para> + See also <function>pg_connection_status</function> and + <function>pg_get_result</function> </para> </refsect1> </refentry> @@ -1815,7 +1969,15 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_connection_reset</function> reset connection with + the same parameter when connection is made. It is useful for + error recovery. It returns &true; if it resets connection + successfully, otherwise returns &false;. + </para> + <para> + See also <function>pg_connect</function>, + <function>pg_pconnect</function> and + <function>pg_connection_status</function> </para> </refsect1> </refentry> @@ -1832,11 +1994,16 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>pg_connection_status</function></funcdef> - <paramdef>resource <parameter>connnection</parameter></paramdef> + <paramdef>resource <parameter>connection</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_connection_status</function> returns a connection + status. Possible status is <literal>PGSQL_CONNECTION_O</literal> + or <literal>PGSQL_CONNECTION_BAD</literal>. + </para> + <para> + See also <function>pg_connection_busy</function> </para> </refsect1> </refentry> @@ -1845,7 +2012,7 @@ <refnamediv> <refname>pg_copy_from</refname> <refpurpose> - No description given yet + é åãããã¼ãã«ãã³ãã¼ãã </refpurpose> </refnamediv> <refsect1> @@ -1861,7 +2028,11 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_copy_from</function> copy table from array. It + return &true; for success, otherwise &false;. + </para> + <para> + See also <function>pg_copy_to</function> </para> </refsect1> </refentry> @@ -1870,7 +2041,7 @@ <refnamediv> <refname>pg_copy_to</refname> <refpurpose> - Send null-terminated string to backend server + é åã«ãã¼ãã«ãã³ãã¼ãã </refpurpose> </refnamediv> <refsect1> @@ -1885,7 +2056,12 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_copy_to</function> copy table to array. The result + array is returned if it success to copy. Otherwise it returns + &false;. + </para> + <para> + See also <function>pg_copy_from</function> </para> </refsect1> </refentry> @@ -1894,7 +2070,7 @@ <refnamediv> <refname>pg_escape_bytea</refname> <refpurpose> - Escape binary for bytea type + byteaåã«ãã¤ããªãã¨ã¹ã±ã¼ããã </refpurpose> </refnamediv> <refsect1> @@ -1906,7 +2082,16 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_escape_string</function>ã¯ãbyteaãã¼ã¿åç¨ã«æåå + ãã¨ã¹ã±ã¼ããã¾ãããã®é¢æ°ã¯ã¨ã¹ã±ã¼ããããæååãè¿ãã¾ãã + </para> + <note> + <para> + ãã®é¢æ°ã¯ãPostgreSQL 7.2以éãå¿ è¦ã¨ãã¾ãã + </para> + </note> + <para> + <function>pg_escape_string</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -1915,7 +2100,7 @@ <refnamediv> <refname>pg_escape_string</refname> <refpurpose> - Escape string for text/char type + ããã¹ã/æååç¨ã®æååãã¨ã¹ã±ã¼ããã </refpurpose> </refnamediv> <refsect1> @@ -1927,28 +2112,16 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_escape_string</function> escapes string for + text/char datatype. It returns escaped string. </para> - </refsect1> - </refentry> - - <refentry id='function.pg-lo-close'> - <refnamediv> - <refname>pg_lo_close</refname> - <refpurpose> - Close a large object - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>bool <function>pg_lo_close</function></funcdef> - <paramdef>resource <parameter>large_object</parameter></paramdef> - </funcprototype> - </funcsynopsis> + <note> + <para> + This function is requires PostgreSQL 7.2 or later. + </para> + </note> <para> - &warn.undocumented.func; + See also <function>pg_escape_bytea</function> </para> </refsect1> </refentry> @@ -1957,7 +2130,7 @@ <refnamediv> <refname>pg_lo_seek</refname> <refpurpose> - Seeks position of large object + ã©ã¼ã¸ãªãã¸ã§ã¯ãã®ä½ç½®ãã·ã¼ã¯ãã </refpurpose> </refnamediv> <refsect1> @@ -1971,7 +2144,12 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_lo_seek</function> seeks position of large object + resource. <parameter>whence</parameter> is PGSQL_SEEK_SET, + PGSQL_SEEK_CUR or PGSQL_SEEK_END. + </para> + <para> + See also <function>pg_lo_tell</function>. </para> </refsect1> </refentry> @@ -1980,7 +2158,7 @@ <refnamediv> <refname>pg_lo_tell</refname> <refpurpose> - Returns current position of large object + ã©ã¼ã¸ãªãã¸ã§ã¯ãã®ã«ã¬ã³ãã®ä½ç½®ãè¿ã </refpurpose> </refnamediv> <refsect1> @@ -1992,7 +2170,11 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_lo_tell</function> returns current position (offset + from the beginning of large object). + </para> + <para> + See also <function>pg_lo_seek</function>. </para> </refsect1> </refentry> @@ -2001,7 +2183,7 @@ <refnamediv> <refname>pg_result_error</refname> <refpurpose> - Get error message associated with result + çµæã«é¢é£ããã¨ã©ã¼ã¡ãã»ã¼ã¸ãåå¾ãã </refpurpose> </refnamediv> <refsect1> @@ -2013,29 +2195,18 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_result_error</function> returns error message + associated with <parameter>result</parameter> resource. Therefore, + user has better chance to get better error message than + <function>pg_last_error</function>. </para> - </refsect1> - </refentry> - - <refentry id='function.pg-result-status'> - <refnamediv> - <refname>pg_result_status</refname> - <refpurpose> - Get status of query result - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pg_result_status</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> - </funcprototype> - </funcsynopsis> <para> - &warn.undocumented.func; - </para> + See also <function>pg_query</function>, + <function>pg_send_query</function>, + <function>pg_get_result</function>, + <function>pg_last_error</function> and + <function>pg_last_notice</function> + </para> </refsect1> </refentry> Index: phpdoc/ja/functions/posix.xml diff -u phpdoc/ja/functions/posix.xml:1.10 phpdoc/ja/functions/posix.xml:1.11 --- phpdoc/ja/functions/posix.xml:1.10 Wed Dec 12 15:53:34 2001 +++ phpdoc/ja/functions/posix.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.11 $ --> <reference id="ref.posix"> <title>POSIX 颿°</title> <titleabbrev>POSIX</titleabbrev> @@ -243,7 +244,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>posix_getgroups</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <para> Index: phpdoc/ja/functions/printer.xml diff -u phpdoc/ja/functions/printer.xml:1.5 phpdoc/ja/functions/printer.xml:1.6 --- phpdoc/ja/functions/printer.xml:1.5 Wed Dec 12 15:53:35 2001 +++ phpdoc/ja/functions/printer.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <reference id="ref.printer"> <title>ããªã³ã¿é¢æ°</title> <titleabbrev>ããªã³ã¿</titleabbrev> @@ -41,8 +42,10 @@ <example> <title><function>printer_open</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open("HP Deskjet 930c"); $handle = printer_open(); +]]> </programlisting> </example> </refsect1> @@ -65,14 +68,17 @@ ãã®é¢æ°ã¯ãããªã³ã¿ã®ã¹ãã¼ã«ãã¡ã¤ã«ãåé¤ãã¾ãã </para> <para> - <parameter>handle</parameter> ã«ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ãæå®ããå¿ è¦ãããã¾ãã + <parameter>handle</parameter> ã«ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã + æå®ããå¿ è¦ãããã¾ãã </para> <example> <title><function>printer_abort</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_abort($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -93,7 +99,8 @@ </funcsynopsis> <para> ãã®é¢æ°ã¯ãããªã³ã¿ã¸ã®æ¥ç¶ãã¯ãã¼ãºãã¾ãã - <function>printer_close</function> ã¯ãã¢ã¯ãã£ããªããã¤ã¹ã³ã³ããã¹ãã¸ãã¯ãã¼ãºãã¾ãã + <function>printer_close</function> ã¯ãã¢ã¯ãã£ããªããã¤ã¹ã³ã³ã + ãã¹ãã¸ãã¯ãã¼ãºãã¾ãã </para> <para> <parameter>handle</parameter> ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ è¦ãããã¾ãã @@ -101,8 +108,10 @@ <example> <title><function>printer_close</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -123,17 +132,21 @@ </funcprototype> </funcsynopsis> <para> - <parameter>content</parameter> ãç´æ¥ããªã³ã¿ã«æ¸ãè¾¼ã¿ãæåæã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + <parameter>content</parameter> ãç´æ¥ããªã³ã¿ã«æ¸ãè¾¼ã¿ãæåæã« + &true;ã失æããå ´åã«&false;ãè¿ãã¾ãã </para> <para> - <parameter>handle</parameter> ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ è¦ãããã¾ãã + <parameter>handle</parameter> ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ã + ãå¿ è¦ãããã¾ãã </para> <example> <title><function>printer_write</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_write($handle, "Text to print"); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -161,7 +174,9 @@ <para> ãã®é¢æ°ã¯ãå©ç¨å¯è½ãªããªã³ã¿ã¨ãã®æ©è½ã調ã¹ã¾ãã <parameter>level</parameter>ã«ã¯ãæ å ±è¦æ±ã®ã¬ãã«ãè¨å®ãã¾ãã - ããã¯ã1,2,4 ã¾ã㯠5ã¨ãããã¨ãå¯è½ã§ãã<parameter>enumtype</parameter> ã¯æ¬¡ã®å®ç¾©æ¸ã¿ã®å®æ°ã®ã©ããã¨ããå¿ è¦ãããã¾ãã + ããã¯ã1,2,4 ã¾ã㯠5ã¨ãããã¨ãå¯è½ã§ãã + <parameter>enumtype</parameter> ã¯æ¬¡ã®å®ç¾©æ¸ã¿ã®å®æ°ã®ã©ããã¨ã + ãå¿ è¦ãããã¾ãã <itemizedlist> <listitem> <simpara> @@ -172,13 +187,16 @@ <listitem> <simpara> <parameter>PRINTER_ENUM_NAME</parameter>: - <parameter>name</parameter>ã®ãµã¼ãããã¡ã¤ã³ã¾ãã¯ããªã³ããããã¤ãã«ãªããã¨ãã§ãããã®ãæ°ãã¾ãã + <parameter>name</parameter>ã®ãµã¼ãããã¡ã¤ã³ã¾ãã¯ããªã³ãã + ããã¤ãã«ãªããã¨ãã§ãããã®ãæ°ãã¾ãã </simpara> </listitem> <listitem> <simpara> <parameter>PRINTER_ENUM_SHARED</parameter>: - ãã®ãã©ã¡ã¼ã¿ã¯åç¬ã§ã¯ä½¿ç¨ã§ãããä»ã®ãã©ã¡ã¼ã¿ãå ±æããªã³ã¿ãæ¤åºããããã®PRINTER_ENUM_LOCALãã¨ã¨ãã«ä½¿ç¨ããå¿ è¦ãããã¾ãã + ãã®ãã©ã¡ã¼ã¿ã¯åç¬ã§ã¯ä½¿ç¨ã§ãããä»ã®ãã©ã¡ã¼ã¿ãå ±æããªã³ + ã¿ãæ¤åºããããã®PRINTER_ENUM_LOCALãã¨ã¨ãã«ä½¿ç¨ããå¿ è¦ãã + ãã¾ãã </simpara> </listitem> <listitem> @@ -203,7 +221,8 @@ <listitem> <simpara> <parameter>PRINTER_ENUM_REMOTE</parameter>: - (WinNT/2000 ã®ã¿) ã³ã³ãã¥ã¼ã¿ã®ãã¡ã¤ã³ã«ãããããã¯ã¼ã¯ããªã³ã¿ã¨ããªã³ã¿ãµã¼ããæ°ãã¾ãã + (WinNT/2000 ã®ã¿) ã³ã³ãã¥ã¼ã¿ã®ãã¡ã¤ã³ã«ãããããã¯ã¼ã¯ã㪠+ ã³ã¿ã¨ããªã³ã¿ãµã¼ããæ°ãã¾ãã <parameter>level</parameter> ã 1ã®å ´åã®ã¿æå¹ã§ãã </simpara> </listitem> @@ -212,8 +231,10 @@ <example> <title><function>printer_list</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ /* ãã¼ã«ã«ãªå ±æããªã³ã¿ãæ¤åº */ var_dump( printer_list(PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED) ); +]]> </programlisting> </example> </refsect1> @@ -440,10 +461,12 @@ <example> <title><function>printer_set_option</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_set_option($handle, PRINTER_SCALE, 75); printer_set_option($handle, PRINTER_TEXT_ALIGN, PRINTER_TA_LEFT); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -486,9 +509,11 @@ <example> <title><function>printer_get_option</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); print printer_get_option($handle, PRINTER_DRIVERVERSION); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -516,6 +541,7 @@ <example> <title><function>printer_create_dc</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle); printer_start_page($handle); @@ -537,6 +563,7 @@ printer_endpage($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -590,6 +617,7 @@ <example> <title><function>printer_start_doc</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -597,6 +625,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -790,6 +819,7 @@ <function>printer_select_pen</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -804,6 +834,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -938,6 +969,7 @@ <function>printer_select_brush</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -962,6 +994,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1115,6 +1148,7 @@ <function>printer_select_font</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1127,6 +1161,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1157,9 +1192,11 @@ <function>printer_logical_fontheight</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); print printer_logical_fontheight($handle, 72); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1213,6 +1250,7 @@ <title> <function>printer_draw_roundrect</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1231,6 +1269,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1277,6 +1316,7 @@ <function>printer_draw_rectangle</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1295,6 +1335,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1339,6 +1380,7 @@ <function>printer_draw_elipse</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1357,6 +1399,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1388,6 +1431,7 @@ <example> <title><function>printer_draw_text</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1400,6 +1444,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1432,6 +1477,7 @@ <example> <title><function>printer_draw_line</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1447,6 +1493,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1513,6 +1560,7 @@ <example> <title><function>printer_draw_chord</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1531,6 +1579,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1596,6 +1645,7 @@ <example> <title><function>printer_draw_chord</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1614,6 +1664,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1637,7 +1688,10 @@ </funcprototype> </funcsynopsis> <para> - ãã®é¢æ°ã¯ããããããã<parameter>filename</parameter>ã座æ¨<parameter>x</parameter>, <parameter>y</parameter>ã«æç»ãã¾ãã<parameter>handle</parameter>ã¯ããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ è¦ãããã¾ãã + ãã®é¢æ°ã¯ããããããã<parameter>filename</parameter>ãåº§æ¨ + <parameter>x</parameter>, <parameter>y</parameter>ã«æç»ãã¾ãã + <parameter>handle</parameter>ã¯ããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ + è¦ãããã¾ãã </para> <para> ãã®é¢æ°ã¯æåæã«&true;ããã以å¤ã®å ´åã«&false;ãè¿ãã¾ãã @@ -1645,6 +1699,7 @@ <example> <title><function>printer_draw_bmp</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1654,6 +1709,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> Index: phpdoc/ja/functions/pspell.xml diff -u phpdoc/ja/functions/pspell.xml:1.12 phpdoc/ja/functions/pspell.xml:1.13 --- phpdoc/ja/functions/pspell.xml:1.12 Wed Dec 12 15:53:36 2001 +++ phpdoc/ja/functions/pspell.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.13 $ --> + +<!-- pspell currently (2001-08-14) doesn't use resources --> <reference id="ref.pspell"> <title>Pspell颿°</title> <titleabbrev>Pspell</titleabbrev> @@ -45,12 +48,14 @@ <example> <title><function>pspell_add_to_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); $pspell_link = pspell_new_config ($pspell_config); pspell_add_to_personal ($pspell_link, "Vlad"); pspell_save_wordlist ($pspell_link); +]]> </programlisting> </example> </para> @@ -90,7 +95,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>pspell_check</function></funcdef> + <funcdef>bool <function>pspell_check</function></funcdef> <paramdef>int <parameter>dictionary_link</parameter></paramdef> <paramdef>string <parameter>word</parameter></paramdef> </funcprototype> @@ -103,6 +108,7 @@ <example> <title><function>pspell_check</function></title> <programlisting role="php"> +<![CDATA[ $pspell_link = pspell_new ("en"); if (pspell_check ($pspell_link, "testt")) { @@ -110,6 +116,7 @@ } else { echo "Sorry, wrong spelling"; } +]]> </programlisting> </example> </para> @@ -139,6 +146,7 @@ <example> <title><function>pspell_add_to_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); $pspell_link = pspell_new_config ($pspell_config); @@ -146,6 +154,7 @@ pspell_add_to_personal ($pspell_link, "Vlad"); pspell_clear_session ($pspell_link); pspell_save_wordlist ($pspell_link); //"Vlad" ã¯ä¿åããã¾ããã +]]> </programlisting> </example> </para> @@ -242,10 +251,12 @@ <example> <title><function>pspell_config_create</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); $pspell_link = pspell_new_personal ($pspell_config, "en"); +]]> </programlisting> </example> </para> @@ -276,10 +287,12 @@ <example> <title><function>pspell_config_ignore</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_ignore($pspell_config, 5); $pspell_link = pspell_new_config($pspell_config); pspell_check($pspell_link, "abcd"); // ã¨ã©ã¼ãçãã¾ãã +]]> </programlisting> </example> </para> @@ -332,10 +345,12 @@ <example> <title><function>pspell_config_mode</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_mode($pspell_config, PSPELL_FAST); $pspell_link = pspell_new_config($pspell_config); pspell_check($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -373,10 +388,12 @@ <example> <title><function>pspell_config_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); $pspell_link = pspell_new_config ($pspell_config); pspell_check ($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -413,11 +430,13 @@ <example> <title><function>pspell_config_repl</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); $pspell_link = pspell_new_config ($pspell_config); pspell_check ($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -452,10 +471,12 @@ <example> <title><function>pspell_config_runtogether</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_runtogether ($pspell_config, true); $pspell_link = pspell_new_config ($pspell_config); pspell_check ($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -594,8 +615,10 @@ <example> <title><function>pspell_new</function></title> <programlisting role="php"> +<![CDATA[ $pspell_link = pspell_new ("en", "", "", "", (PSPELL_FAST | PSPELL_RUN_TOGETHER)); +]]> </programlisting> </example> </para> @@ -635,10 +658,12 @@ <example> <title><function>pspell_new_config</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); $pspell_link = pspell_new_personal ($pspell_config, "en"); +]]> </programlisting> </example> </para> @@ -762,8 +787,10 @@ <example> <title><function>pspell_new_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws", "en", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER)); +]]> </programlisting> </example> </para> @@ -797,12 +824,14 @@ <example> <title><function>pspell_add_to_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/tmp/dicts/newdict"); $pspell_link = pspell_new_config ($pspell_config); pspell_add_to_personal ($pspell_link, "Vlad"); pspell_save_wordlist ($pspell_link); +]]> </programlisting> </example> </para> @@ -842,6 +871,7 @@ <example> <title><function>pspell_store_replacement</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); @@ -849,6 +879,7 @@ pspell_store_replacement ($pspell_link, $misspelled, $correct); pspell_save_wordlist ($pspell_link); +]]> </programlisting> </example> </para> @@ -877,15 +908,17 @@ <example> <title><function>pspell_suggest</function></title> <programlisting role="php"> -$pspell_link = pspell_new ("english"); +<![CDATA[ +$pspell_link = pspell_new ("en"); -if (!pspell_check ($pspell_link, "testt")){ +if (!pspell_check ($pspell_link, "testt")) { $suggestions = pspell_suggest ($pspell_link, "testt"); - for ($i=0; $i < count ($suggestions); $i++) { - echo "Possible spelling: " . $suggestions[$i] . "<br>"; + foreach ($suggestions as $suggestion) { + echo "Possible spelling: $suggestion<br>"; } } +]]> </programlisting> </example> </para> Index: phpdoc/ja/functions/readline.xml diff -u phpdoc/ja/functions/readline.xml:1.7 phpdoc/ja/functions/readline.xml:1.8 --- phpdoc/ja/functions/readline.xml:1.7 Wed Dec 12 15:53:37 2001 +++ phpdoc/ja/functions/readline.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <reference id="ref.readline"> <title>GNU Readline</title> <titleabbrev>Readline</titleabbrev> @@ -47,10 +48,11 @@ <example> <title><function>readline</function></title> <programlisting role="php"> +<![CDATA[ // ã¦ã¼ã¶ãã3åã³ãã³ããåå¾ -for ($i=0; $i < 3; $i++) { - $line = readline("Command: "); - readline_add_history($line); +for ($i=0; $i < 3; $i++) { + $line = readline ("Command: "); + readline_add_history ($line); } // ãã¹ããªããã³ã @@ -58,6 +60,7 @@ // 夿°ããã³ã print_r(readline_info()); +]]> </programlisting> </example> </refsect1> Index: phpdoc/ja/functions/recode.xml diff -u phpdoc/ja/functions/recode.xml:1.9 phpdoc/ja/functions/recode.xml:1.10 --- phpdoc/ja/functions/recode.xml:1.9 Wed Dec 12 15:53:37 2001 +++ phpdoc/ja/functions/recode.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.recode"> <title>GNU Recode 颿°</title> <titleabbrev>Recode</titleabbrev> @@ -47,7 +48,9 @@ <example> <title>åºæ¬ç㪠<function>recode_string</function> ã®ä¾:</title> <programlisting role="php"> -print recode_string ("us..flat", "The following character has a diacritical mark: &aacute;"); +<![CDATA[ +print recode_string ("us..flat", "The following character has a diacritical mark: á"); +]]> </programlisting> </example> </para> @@ -109,9 +112,11 @@ <example> <title>åºæ¬ç㪠<function>recode_file</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $input = fopen ('input.txt', 'r'); $output = fopen ('output.txt', 'w'); -recode_file ("us..flat", $input, $output); +recode_file ("us..flat", $input, $output); +]]> </programlisting> </example> </para> Index: phpdoc/ja/functions/regex.xml diff -u phpdoc/ja/functions/regex.xml:1.14 phpdoc/ja/functions/regex.xml:1.15 --- phpdoc/ja/functions/regex.xml:1.14 Wed Dec 12 15:53:37 2001 +++ phpdoc/ja/functions/regex.xml Sat Jan 26 10:38:34 2002 @@ -1,49 +1,63 @@ <?xml version="1.0" encoding="utf-8"?> <reference id="ref.regex"> - <title>æ£è¦è¡¨ç¾é¢æ° (POSIXæ¡å¼µãµãã¼ã)</title> +<!-- $Revision: 1.15 $ --> + <title>æ£è¦è¡¨ç¾(regex)颿° (POSIXæ¡å¼µãµãã¼ã)</title> <titleabbrev>Regexps</titleabbrev> <partintro> + <note> + <para> + PHPã¯ã<link linkend="ref.pcre">PCRE颿°</link>ã«ããPerläºæã®æ§ + æã使ç¨ããæ£è¦è¡¨ç¾å¼ããµãã¼ããã¾ãããããã®é¢æ°ã¯ã貪欲ã§ãª + ãããããè¨æãæ¡ä»¶ä»ããµããã¿ã¼ã³ãããã¦POSIXæ¡å¼µæ£è¦è¡¨ç¾æ§æ + ã§ãµãã¼ãããã¦ããªãä»ã®è¤æ°ã®æ©è½ããµãã¼ããã¾ãã + </para> + </note> + <warning> + <para> + ãããã®æ£è¦è¡¨ç¾é¢æ°ã¯ãã¤ããªã»ã¼ãã§ã¯ããã¾ããã<link + linkend="ref.pcre">PCRE颿°</link>ã¯ãã¤ããªã»ã¼ãã§ãã + </para> + </warning> <para> PHPã«ããã¦æ£è¦è¡¨ç¾ã¯è¤éãªæååæä½ã«ä½¿ç¨ããã¾ãã æ¬¡ã®æ£è¦è¡¨ç¾é¢æ°ããµãã¼ãããã¾ãã <itemizedlist> + <listitem> + <simpara><function>ereg</function></simpara> + </listitem> + <listitem> + <simpara><function>ereg_replace</function></simpara> + </listitem> <listitem> - <simpara><function>ereg</function></simpara> - </listitem> - <listitem> - <simpara><function>ereg_replace</function></simpara> - </listitem> - <listitem> - <simpara><function>eregi</function></simpara> - </listitem> - <listitem> - <simpara><function>eregi_replace</function></simpara> - </listitem> - <listitem> - <simpara><function>split</function></simpara> - </listitem> - <listitem> - <simpara><function>spliti</function></simpara> - </listitem> - </itemizedlist> + <simpara><function>eregi</function></simpara> + </listitem> + <listitem> + <simpara><function>eregi_replace</function></simpara> + </listitem> + <listitem> + <simpara><function>split</function></simpara> + </listitem> + <listitem> + <simpara><function>spliti</function></simpara> + </listitem> + </itemizedlist> ãããã®é¢æ°ã¯ãå ¨ã¦æåã®å¼æ°ã«æ£è¦è¡¨ç¾ãã¨ãã¾ãã PHPã¯POSIX 1003.2ã§å®ç¾©ãããPOSIXæ¡å¼µæ£è¦è¡¨ç¾ã使ç¨ãã¾ãã POSIXæ£è¦è¡¨ç¾ã«é¢ãã詳細ã«ã¤ãã¦ã¯ãPHPé å¸ãã¡ã¤ã«ã®regexãã£ã¬ ã¯ããªã«ããregexã®manãã¼ã¸ãåç §ä¸ããã ãã®ãã¼ã¸ã¯manpageãã©ã¼ãããã§ãããèªãã«ã¯ <command>man /usr/local/src/regex/regex.7</command>ã®ããã«ãã¾ãã - - <!-- Should add discussion of PCRE functions here. --></para> - + </para> <para> <example> <title>æ£è¦è¡¨ç¾ã®ä¾</title> <programlisting role="php"> -ereg ("abc", $string); -/* "abc"ã$stringã®ã©ããã«ããå ´åã«trueãè¿ã */ +<![CDATA[ +ereg ("abc", $string); +/* "abc"ã$stringã®ã©ããã«ããå ´åã«trueãè¿ã */ -ereg ("^abc", $string); +ereg ("^abc", $string); /* "abc" ã$stringã®æåã«ããå ´åã«trueãè¿ã */ ereg ("abc$", $string); @@ -56,14 +70,15 @@ /* 空ç½ã§åºåããã3ã¤åèªã $regs[1], $regs[2],$regs[3]ã«ä»£å ¥ãã */ -$string = ereg_replace ("^", "<BR>", $string); +$string = ereg_replace ("^", "<br />", $string); /* <BR> ã¿ã°ã $string ã®å é ã«æ¿å ¥ãã */ -$string = ereg_replace ("$", "<BR>", $string); +$string = ereg_replace ("$", "<br />", $string); /* <BR> ã¿ã°ã $string ã®æå¾ã«æ¿å ¥ãã */ $string = ereg_replace ("\n", "", $string); /* $stringã®æ¹è¡æåãå ¨ã¦åãé¤ã */ +]]> </programlisting> </example> </para> @@ -101,14 +116,17 @@ ã¨ãã£ãããã«ãªã£ã¦ãã¾ãã$regs[0]㯠<parameter>string</parameter>ã®ã³ãã¼ãä¿æãã¦ãã¾ãã </simpara> - <simpara> - <function>ereg</function>ãä½ãã«å®å ¨ã«ãããããå ´åã$regs ã«ã¯ - ã¡ããã©10åã®è¦ç´ ãä»£å ¥ããã¾ããããã¯ãæ¬å¼§ã§æ¬ãããé¨åæå - åã®ãã¡ãå®éã«ããããããã®ã 10 ããå°ãªãã¦ãå¤ãã¦ãåæ§ã§ - ãããã ãã<function>ereg</function>ã«ã¯ããå¤ãã®é¨åæååã«ãã - ãããè½åãããã¾ããããããããã®ãè¦ä»ãããªãã£ãå ´åã$regs - ã¯ã<function>ereg</function>ã«ããæ¸ãæãããã¾ããã - </simpara> + <note> + <simpara> + PHP 4.1.0ããåã®ãã¼ã¸ã§ã³ã§ã¯ã<literal>$regs</literal>ã«ã¯ã¡ã + ãã©10åã®è¦ç´ ãä»£å ¥ããã¾ãããããã¯ãå®éã«ãããããæ¬å¼§ä»ã + ã®ãµãæååã10ããå¤ãã¦ãå°ãªãã¦ãåãã§ããããã ãã + <function>ereg</function>ã«ã¯ããå¤ãã®é¨åæååã«ãããããè½ + åãããã¾ããããããããã®ãè¦ä»ãããªãã£ãå ´åã + <literal>$regs</literal>ã¯ã<function>ereg</function>ã«ããæ¸ã + æãããã¾ããã + </simpara> + </note> <simpara> æ¤ç´¢ã«ããã¦ã¯ã大æåã¨å°æåãåºå¥ãã¾ãã </simpara> @@ -123,17 +141,20 @@ <example> <title><function>ereg</function>ã®ä¾</title> <programlisting role="php"> -if ( ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) { +<![CDATA[ +if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) { echo "$regs[3].$regs[2].$regs[1]"; } else { - echo "æ¥ä»ã®ãã©ã¼ãããã䏿£ã§ãï¼$date"; + echo "Invalid date format: $date"; } +]]> </programlisting> </example> </para> <simpara> <function>eregi</function>,<function>ereg_replace</function>, - <function>eregi_replace</function>ãåç §ä¸ããã + <function>eregi_replace</function>,<function>preg_match</function> + ãåç §ä¸ããã </simpara> </refsect1> </refentry> @@ -153,6 +174,13 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + <note> + <para> + Perläºæã®æ£è¦è¡¨ç¾æ§æã使ç¨ãã + <function>preg_replace</function>ã¯ããã°ãã° + <function>ereg_replace</function>ãããéã代æ¿é¢æ°ã§ãã + </para> + </note> <simpara> ãã®é¢æ°ã¯ã<parameter>string</parameter>ãã¹ãã£ã³ã㦠<parameter>pattern</parameter>ã«ããããããã®ãæ¢ãã @@ -183,10 +211,12 @@ <example> <title><function>ereg_replace</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $string = "This is a test"; -echo ereg_replace ( " is", " was", $string ); -echo ereg_replace ( "( )is", "\\1was", $string ); -echo ereg_replace ( "(( )is)", "\\2was", $string ); +echo ereg_replace (" is", " was", $string); +echo ereg_replace ("( )is", "\\1was", $string); +echo ereg_replace ("(( )is)", "\\2was", $string); +]]> </programlisting> </example> </para> @@ -199,7 +229,8 @@ <example> <title><function>ereg_replace</function> ã®ä¾</title> <programlisting> -<?php +<![CDATA[ +<?php /* ããã¯æå¾ ããéãã«åä½ãã¾ããã */ $num = 4; $string = "This string has four words."; @@ -212,17 +243,29 @@ $string = ereg_replace('four', $num, $string); echo $string; /* åºå: 'This string has 4 words.' */ ?> +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>URLããªã³ã¯ã§ç½®æãã</title> + <programlisting role="php"> +<![CDATA[ +$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", + "<a href=\"\\0\">\\0</a>", $text); +]]> </programlisting> </example> </para> <simpara> <function>ereg</function>, <function>eregi</function>, - <function>eregi_replace</function>ãåç §ä¸ããã + <function>eregi_replace</function>, <function>str_replace</function>, + <function>preg_match</function>ãåç §ä¸ããã </simpara> </refsect1> </refentry> - <refentry id="function.eregi"> <refnamediv> <refname>eregi</refname> @@ -248,15 +291,24 @@ ãã®é¢æ°ã¯ãã¢ã«ãã¡ãããæåããããã³ã°ãããé㫠大æåå°æåã®åºå¥ãããªããã¨ä»¥å¤ã¯<function>ereg</function>ã¨å ãã§ãã + <example> + <title><function>eregi</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +if (eregi("z", $string)) { + echo "'$string' contains a 'z' or 'Z'!"; +} +]]> + </programlisting> + </example> </para> <para> - <function>ereg</function>, <function>ereg_replace</function> - ããã³<function>eregi_replace</function>ãåç §ä¸ããã + <function>ereg</function>, <function>ereg_replace</function>, + <function>eregi_replace</function>ãåç §ä¸ããã </para> </refsect1> </refentry> - <refentry id="function.eregi-replace"> <refnamediv> <refname>eregi_replace</refname> @@ -303,6 +355,13 @@ </paramdef> </funcprototype> </funcsynopsis> + <note> + <para> + Perläºæã®æ£è¦è¡¨ç¾æ§æã使ç¨ãã<function>preg_split</function> + ã¯ãå¾ã ã«ãã¦<function>split</function>ãããéãä»£æ¿æ¡ã¨ãªãã¾ + ãã + </para> + </note> <para> æååã®é åãè¿ãã¾ããé åã®åè¦ç´ ã¯æ£è¦è¡¨ç¾ <parameter>pattern</parameter>ã«ããåºåããã @@ -319,19 +378,33 @@ <example> <title><function>split</function>ã®ä¾</title> <programlisting role="php"> -$passwd_list = split ( ":", $passwd_line, 5 ); +<![CDATA[ +list($user,$pass,$uid,$gid,$extra)= split (":", $passwd_line, 5); +]]> </programlisting> </example> </para> + <tip> + <simpara> + <parameter>pattern</parameter>ã<replaceable>n</replaceable>åç¾ + ããå ´åãè¿ãããé åã«ã¯ã + <literal><replaceable>n</replaceable>+1</literal>åã®ã¢ã¤ãã ã + å«ã¾ãã¾ããä¾ãã°ã<parameter>pattern</parameter>ãç¾ããªãå ´åã + 1åã®è¦ç´ ã®ã¿ãæããé åãè¿ããã¾ãããã¡ããããã㯠+ <parameter>string</parameter>ã空ã®å ´åãåæ§ã§ãã + </simpara> + </tip> <para> ã¹ã©ãã·ã¥ããããããã¤ãã³ãããªãã¿ã¨ããã¨æ¥ä»ãå¦çããä¾ã 以ä¸ã«ç¤ºãã¾ãã <example> <title><function>split</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $date = "04/30/1973"; // ããªãã¿ã¯ã¹ã©ãã·ã¥ããããããã¤ãã³ã®ã©ããã§ãã list ($month, $day, $year) = split ('[/.-]', $date); -echo "Month: $month; Day: $day; Year: $year<br>\n"; +echo "Month: $month; Day: $day; Year: $year<br>\n"; +]]> </programlisting> </example> </para> @@ -361,9 +434,10 @@ <command>man /usr/local/src/regex/regex.7</command>ã®ããã«ãã¾ãã </para> <para> - <function>preg_split</function>, - <function>spliti</function>,<function>explode</function>, - <function>implode</function>ãåç §ä¸ããã + <function>preg_split</function>, <function>spliti</function>, + <function>explode</function>, <function>implode</function>, + <function>chunk_split</function>, <function>wordwrap</function>ã + åç §ä¸ããã </para> </refsect1> </refentry> @@ -425,7 +499,9 @@ <example> <title><function>sql_regcase</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ echo sql_regcase ("Foo bar"); +]]> </programlisting> </example> ããã¯ã<screen>[Ff][Oo][Oo] [Bb][Aa][Rr]</screen>ã¨è¡¨ç¤ºãã¾ãã @@ -437,7 +513,6 @@ </para> </refsect1> </refentry> - </reference> @@ -457,4 +532,7 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 -->
Index: phpdoc/ja/functions/network.xml diff -u phpdoc/ja/functions/network.xml:1.23 phpdoc/ja/functions/network.xml:1.24 --- phpdoc/ja/functions/network.xml:1.23 Sat Jan 26 03:55:51 2002 +++ phpdoc/ja/functions/network.xml Sat Jan 26 10:38:31 2002 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.23 $ --> +<!-- $Revision: 1.24 $ --> <reference id="ref.network"> - <title>ãããã¯ã¼ã¯é¢æ°</title> + <title>ãããã¯ã¼ã¯é¢æ°(network)</title> <titleabbrev>ãããã¯ã¼ã¯</titleabbrev> <refentry id="function.checkdnsrr"> @@ -213,16 +213,20 @@ <example> <title><function>fsockopen</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ +<?php $fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30); if (!$fp) { - echo "$errstr ($errno)<br>\n"; + echo "$errstr ($errno)<br>\n"; } else { - fputs ($fp, "GET / HTTP/1.0\r\n\r\n"); - while (!feof($fp)) { - echo fgets ($fp,128); - } - fclose ($fp); + fputs ($fp, "GET / HTTP/1.0\r\nHost: www.php.net\r\n\r\n"); + while (!feof($fp)) { + echo fgets ($fp,128); + } + fclose ($fp); } +?> +]]> </programlisting> </example> 以ä¸ã®ä¾ã¯ãèªåã®ãã·ã³ã®UDPãµã¼ãã¹ "daytime" (ãã¼ã13)ããæ¥ @@ -230,16 +234,18 @@ <example> <title>UDPæ¥ç¶ã®ä½¿ç¨æ³</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $fp = fsockopen("udp://127.0.0.1", 13, $errno, $errstr); if (!$fp) { - echo "ERROR: $errno - $errstr<br>\n"; + echo "ERROR: $errno - $errstr<br>\n"; } else { fwrite($fp,"\n"); echo fread($fp, 26); fclose($fp); } -?> +?> +]]> </programlisting> </example> <note> @@ -511,12 +517,14 @@ <example> <title><function>ip2long</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $ip = gethostbyname("www.php.net"); -$out = "The following URLs are equivalent:<br>\n"; -$out .= "http://www.php.net/, http://".$ip."/, and http://".ip2long($ip)."/<br>\n"; +$out = "The following URLs are equivalent:<br>\n"; +$out .= "http://www.php.net/, http://".$ip."/, and http://".sprintf("%u",ip2long($ip))."/<br>\n"; echo $out; -?> +?> +]]> </programlisting> </example> </para> @@ -526,11 +534,13 @@ <example> <title>IPã¢ãã¬ã¹ã®è¡¨ç¤º</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $ip = gethostbyname("www.php.net"); -printf ("%u\n", ip2long ($ip)); +printf("%u\n", ip2long($ip)); echo $out; -?> +?> +]]> </programlisting> </example> </para> @@ -870,8 +880,9 @@ <example> <title><function>socket_set_timeout</function>ã®ä¾</title> <programlisting role="php"> -<?php -$fp = fsockopen("http://www.php.net", 80); +<![CDATA[ +<?php +$fp = fsockopen("www.php.net", 80); if(!$fp) { echo "Unable to open\n"; } else { @@ -883,7 +894,8 @@ fclose($fp); print $res; } -?> +?> +]]> </programlisting> </example> </para> @@ -971,11 +983,12 @@ <example> <title><function>syslog</function>ã®ä½¿ç¨ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php define_syslog_variables(); // syslogããªã¼ãã³ããããã»ã¹IDãã¤ã³ã¯ã«ã¼ãããæ¨æºã¨ã©ã¼åºåã«ã // ãã°ãåºåãã¾ããããã¦ãã¦ã¼ã¶å®ç¾©ã®ãã°è¨é²æ©æ§ã使ç¨ãã¾ãã -openlog("myScripLog", LOG_PID | LOG_PERROR, LOG_LOCAL0); +openlog("myScripLog", LOG_PID | LOG_PERROR, LOG_LOCAL0); // ä½ããã®ã³ã¼ã @@ -984,12 +997,13 @@ } else { // ã¯ã©ã¤ã¢ã³ãã¯æªèªè¨¼! // ãã°ãè¨é²ãã - $access = date("Y/m/d H:i:s"); - syslog(LOG_WARNING,"Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)"); + $access = date("Y/m/d H:i:s"); + syslog(LOG_WARNING,"Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)"); } closelog(); -?> +?> +]]> </programlisting> </example> ã¦ã¼ã¶å®ç¾©ã®ãã°ãã³ãã©ã®è¨å®ã«é¢ããæ å ±ã«ã¤ãã¦ã¯ãUNIXãã㥠Index: phpdoc/ja/functions/nis.xml diff -u phpdoc/ja/functions/nis.xml:1.13 phpdoc/ja/functions/nis.xml:1.14 --- phpdoc/ja/functions/nis.xml:1.13 Wed Dec 12 15:53:25 2001 +++ phpdoc/ja/functions/nis.xml Sat Jan 26 10:38:31 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.14 $ --> <reference id="ref.nis"> <title>YP/NIS颿°</title> <titleabbrev>YP/NIS</titleabbrev> @@ -31,10 +32,9 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>yp_get_default_domain</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> - <para> <function>yp_get_default_domain</function> ã¯ããã¼ãã®ããã©ã«ã ãã¡ã¤ã³ã¾ã㯠&false; ãè¿ãã¾ããè¿ãå¤ã¯ããã®å¾ã® NIS ã³ã¼ã«ã§ @@ -49,22 +49,21 @@ <example> <title>ããã©ã«ããã¡ã¤ã³ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $domain = yp_get_default_domain(); - -echo "ããã©ã«ãã®NIS ãã¡ã¤ã³: " . $domain; +echo "Default NIS domain is: " . $domain; ?> +]]> </programlisting> </example> </para> - - <para> - <function>yp-get-default-domain</function> ãåç §ä¸ããã <!-- - linkend="function.yp-errno">yp_errno</link> and <link - linkend="function.yp-err-string">yp_err_string</link> ---> + <para> + See also: <link linkend="function.yp-errno">yp_errno</link> and + <link linkend="function.yp-err-string">yp_err_string</link> </para> +--> </refsect1> </refentry> @@ -82,25 +81,20 @@ <paramdef>string <parameter>map</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> <function>yp_order</function> ã¯ããããã®å¼åºçªå·ã¾ãã¯&false; ã è¿ãã¾ãã </para> <para> <example> - <title>NIS å¼åºçªå·ã®ä¾</title> + <title>NISå¼åºçªå·ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $number = yp_order($domain,$mapname); - - if(!$number) { - echo "ã¨ã³ããªãè¦ã¤ããã¾ãã\n"; - <!-- echo yp_errno() . ": " . yp_err_string(); --> - } - - echo "ãã®ãããã®å¼åºçªå·ã¯ã" . $number . "ã§ãã"; + echo "Order number for this map is: " . $number; ?> +]]> </programlisting> </example> </para> @@ -138,11 +132,12 @@ <example> <title>NIS ãã¹ã¿ã¼ã®ä¾</title> <programlisting role="php"> -<?php - $number = yp_master ($domain, $mapname); - - echo "ãã®NISãããã®ãã¹ã¿: " . $master; +<![CDATA[ +<?php +$number = yp_master ($domain, $mapname); +echo "Master for this map is: " . $master; ?> +]]> </programlisting> </example> </para> @@ -180,11 +175,12 @@ <example> <title>NIS æ¤ç´¢ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $entry = yp_match ($domain, "passwd.byname", "joe"); - -echo "æ¤ç´¢ã«ãããããã¨ã³ããª: " . $entry; +echo "Matched entry is: " . $entry; ?> +]]> </programlisting> </example> </para> @@ -200,7 +196,6 @@ linkend="function.yp-err-string">yp_err_string</link> --> </para> - </refsect1> </refentry> @@ -220,7 +215,6 @@ <paramdef>string <parameter>map</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> <function>yp_first</function> ã¯ããã¡ã¤ã³ <parameter>domain</parameter>ã®ããã<parameter>map</parameter>ã @@ -230,13 +224,14 @@ <example> <title>NIS first ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $entry = yp_first($domain, "passwd.byname"); $key = $entry ["key"]; $value = $entry ["value"]; -echo "ãã®ãããã®æåã®ã¨ã³ããªã«ã¯ãã¼ " . $key . " ã¨å¤ " . $value - . "ãããã¾ãã"; +echo "First entry in this map has key " . $key . " and value " . $value; ?> +]]> </programlisting> </example> </para> @@ -273,18 +268,21 @@ <example> <title>NIS next ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $entry = yp_next ($domain, "passwd.byname", "joe"); -if(!$entry) { - echo yp_errno() . ": " . yp_err_string(); +if (!$entry) { + echo "No more entries found\n"; + <!-- echo yp_errno() . ": " . yp_err_string(); --> } -$key = key($entry); +$key = key ($entry); -echo "joe ã®æ¬¡ã®ã¨ã³ããªã®ãã¼ã¯ã" . $key - . " ãå¤ã¯ " . $entry[$key] . "ã§ãã"; +echo "The next entry after joe has key " . $key + . " and value " . $entry[$key]; ?> +]]> </programlisting> </example> </para> @@ -298,7 +296,6 @@ </refsect1> </refentry> -<!-- Function doesn't exist <refentry id="function.yp-errno"> <refnamediv> <refname>yp_errno</refname> @@ -344,10 +341,6 @@ </refsect1> </refentry> ---> - -<!-- Function doesn't exist - <refentry id="function.yp-err-string"> <refnamediv> <refname>yp_err_string</refname> @@ -359,30 +352,75 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>yp_err_string</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> - <para> - <function>yp_err_string</function> ã¯ãåã®æä½ã«é¢ããã¨ã©ã¼ã¡ãã»ã¼ã¸ - ãè¿ãã¾ããä½ãæªãããæ£ç¢ºã«èª¿ã¹ãéã«ä¾¿å©ã§ãã</para> - + <function>yp_err_string</function> ã¯ãåã®æä½ã«é¢ããã¨ã©ã¼ã¡ã + ã»ã¼ã¸ãè¿ãã¾ããä½ãæªãããæ£ç¢ºã«èª¿ã¹ãéã«ä¾¿å©ã§ãã + </para> <para> <example> <title>NIS ã¨ã©ã¼ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php echo "Error: " . yp_err_string(); ?> +]]> </programlisting> - </example></para> + </example> + </para> <para> <function>yp_errno</function>ãåç §ä¸ããã </para> </refsect1> </refentry> ---> + <refentry id='function.yp-all'> + <refnamediv> + <refname>yp_all</refname> + <refpurpose> + ããããèµ°æ»ããåã¨ã³ããªã®é¢æ°ãã³ã¼ã«ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>yp_all</function></funcdef> + <paramdef>string <parameter>domain</parameter></paramdef> + <paramdef>string <parameter>map</parameter></paramdef> + <paramdef>string <parameter>callback</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.yp-cat'> + <refnamediv> + <refname>yp_cat</refname> + <refpurpose> + ã¨ã³ããªããããå«ãé åãè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>yp_cat</function></funcdef> + <paramdef>string <parameter>domain</parameter></paramdef> + <paramdef>string <parameter>map</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> </reference> Index: phpdoc/ja/functions/oci8.xml diff -u phpdoc/ja/functions/oci8.xml:1.19 phpdoc/ja/functions/oci8.xml:1.20 --- phpdoc/ja/functions/oci8.xml:1.19 Wed Dec 12 15:53:25 2001 +++ phpdoc/ja/functions/oci8.xml Sat Jan 26 10:38:33 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> - +<!-- $Revision: 1.20 $ --> <reference id="ref.oci8"> <title>Oracle 8 颿°</title> <titleabbrev>OCI8</titleabbrev> @@ -65,15 +65,17 @@ </para> <para> <informalexample> - <programlisting> -> ldd /www/apache/bin/httpd + <screen> +<![CDATA[ +# ldd /www/apache/bin/httpd libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000) libm.so.6 => /lib/libm.so.6 (0x4002f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000) libdl.so.2 => /lib/libdl.so.2 (0x4007a000) libc.so.6 => /lib/libc.so.6 (0x4007e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) - </programlisting> +]]> + </screen> </informalexample> </para> <para> @@ -82,13 +84,15 @@ </para> <para> <informalexample> - <programlisting> -> cd /usr/src/apache_1.3.xx -> make clean -> LIBS=-lpthread ./config.status -> make -> make install - </programlisting> + <screen> +<![CDATA[ +# cd /usr/src/apache_1.3.xx +# make clean +# LIBS=-lpthread ./config.status +# make +# make install +]]> + </screen> </informalexample> </para> </note> @@ -96,7 +100,8 @@ <example> <title>OCIã«é¢ãããã³ã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // by sergo@bacup.ru // ã³ãã³ãã®å®è¡ãé å»¶ãããã«ã¯ããªãã·ã§ã³ OCI_DEFAULT ã使ç¨ã㦠@@ -114,11 +119,13 @@ field2 = empty_clob()) returning field2 into :field2"; OCIParse($conn, $sql); $clob = OCINewDescriptor($conn, OCI_D_LOB); -OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); +OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); OCIExecute($stmt, OCI_DEFAULT); $clob->save ("some text"); +OCICommit($conn); -?> +?> +]]> </programlisting> </example> </para> @@ -128,7 +135,8 @@ <example> <title>ã¹ãã¢ãããã·ã¼ã¸ã£ã®ä½¿ç¨æ³</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // by webmaster@remoterealty.com $sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', '$lastname', '$company', '$address1', '$address2', '$city', '$state', @@ -142,44 +150,13 @@ OCIBindByName ( $sth, ":error_code", $errorcode, 10 ); OCIExecute ( $sth ); -?> +?> +]]> </programlisting> </example> </para> </partintro> -<!-- - -OCIBindByName -OCIDefineByName -OCIColumnIsNULL -OCIColumnName -OCIColumnSize -OCIColumnType -OCIExecute -OCIFetch -OCIFetchInto -OCIFetchStatement -OCIInternalDebug -OCILogoff -OCILogon -OCIPLogon -OCINLogon -OCIError -OCICommit -OCIRollback -OCINewCursor -OCINewDescriptor -OCIRowCount -OCINumCols -OCIParse -OCIResult -OCIServerVersion -OCIStatementType -OCIFreeStatement -OCIFreeCursor ---> - <refentry id="function.ocidefinebyname"> <refnamediv> <refname>OCIDefineByName</refname> @@ -192,7 +169,7 @@ <funcdef>int <function>OCIDefineByName</function></funcdef> <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>Column-Name</parameter></paramdef> - <paramdef>mixed &<parameter>variable</parameter></paramdef> + <paramdef>mixed <parameter>variable</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>type</optional></replaceable> @@ -210,16 +187,16 @@ select æã«ãªã夿°ãå®ç¾©ããå ´åã¯ãã¨ã©ã¼ã¯çºçããªãã§ããã! </para> <para> - æ½è±¡ Datatype (LOB/ROWID/BFILE) ãå®ç¾©ããå¿ è¦ãããå ´åã - ã¾ã <function>OCINewDescriptor</function> 颿°ãç¨ãã¦ãã® - é åã確ä¿ããå¿ è¦ãããã¾ãã - <function>OCIBindByName</function> 颿°ãåç §ä¸ããã - + æ½è±¡ Datatype (LOB/ROWID/BFILE) ãå®ç¾©ããå¿ è¦ãããå ´åã + ã¾ã <function>OCINewDescriptor</function> 颿°ãç¨ãã¦ãã® + é åã確ä¿ããå¿ è¦ãããã¾ãã + <function>OCIBindByName</function> 颿°ãåç §ä¸ããã </para> - <example> + <example> <title>OCIDefineByName</title> <programlisting> -<?php +<![CDATA[ +<?php /* OCIDefineByPos ã®ä¾ thies@thieso.net (980219) */ $conn = OCILogon("scott","tiger"); @@ -228,8 +205,8 @@ /* the define MUST be done BEFORE ociexecute! */ -OCIDefineByName($stmt,"EMPNO",&$empno); -OCIDefineByName($stmt,"ENAME",&$ename); +OCIDefineByName($stmt,"EMPNO",$empno); +OCIDefineByName($stmt,"ENAME",$ename); OCIExecute($stmt); @@ -240,8 +217,10 @@ OCIFreeStatement($stmt); OCILogoff($conn); -?></programlisting></example> - +?> +]]> + </programlisting> + </example> </refsect1> </refentry> @@ -258,7 +237,7 @@ <paramdef>int <parameter>stmt</parameter></paramdef> <paramdef>string <parameter>ph_name</parameter></paramdef> <paramdef>mixed &<parameter>variable</parameter></paramdef> - <paramdef>int<parameter>length</parameter></paramdef> + <paramdef>int <parameter>length</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>type</optional></replaceable> @@ -278,22 +257,23 @@ ã¾ãã </para> <para> - æ½è±¡ãã¼ã¿å (LOB/ROWID/BFILE) ããã¤ã³ãããå¿ è¦ãããå ´åã - ã¾ã <function>OCINewDescriptor</function> 颿°ã使ç¨ãã¦ããã確ä¿ãã - å¿ è¦ãããã¾ãã - <parameter>length</parameter> ã¯æ½è±¡ãã¼ã¿åç¨ã«ã¯ä½¿ç¨ãããã-1 ãè¨å®ããå¿ è¦ãããã¾ãã - <parameter>type</parameter> 夿°ã¯ä½¿ç¨ããããã£ã¹ã¯ãªãã¿ã®ç¨®é¡ã Oracle ã«ä¼ãã¾ãã - 使ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã: OCI_B_FILE (Binary-File), OCI_B_CFILE - (Character-File), OCI_B_CLOB (Character-LOB), OCI_B_BLOB - (Binary-LOB) ,OCI_B_ROWID (ROWID) + æ½è±¡ãã¼ã¿å (LOB/ROWID/BFILE) ããã¤ã³ãããå¿ è¦ãããå ´åãã¾ã + <function>OCINewDescriptor</function> 颿°ã使ç¨ãã¦ããã確ä¿ãã + å¿ è¦ãããã¾ãã<parameter>length</parameter> ã¯æ½è±¡ãã¼ã¿åç¨ã«ã¯ + 使ç¨ãããã-1 ãè¨å®ããå¿ è¦ãããã¾ãã + <parameter>type</parameter> 夿°ã¯ä½¿ç¨ããããã£ã¹ã¯ãªãã¿ã®ç¨®é¡ + ãOracle ã«ä¼ãã¾ãã使ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã: + OCI_B_FILE (Binary-File), OCI_B_CFILE (Character-File), OCI_B_CLOB + (Character-LOB), OCI_B_BLOB (Binary-LOB) ,OCI_B_ROWID (ROWID) </para> <example> <title>OCIDefineByName</title> <programlisting> -<?php +<![CDATA[ +<?php /* OCIBindByPos ã®ä¾ thies@thieso.net (980221) - - 3 ã¬ã³ã¼ãã emp ã«æ¿å ¥ããæ¿å ¥ã®ç´å¾ã«ã¬ã³ã¼ããæ´æ°ããããã« ROWID ã使ç¨ãã¾ãã + 3ã¬ã³ã¼ããempã«æ¿å ¥ããæ¿å ¥ã®ç´å¾ã«ã¬ã³ã¼ããæ´æ°ããããã« + ROWIDã使ç¨ãã¾ãã */ $conn = OCILogon("scott","tiger"); @@ -306,13 +286,13 @@ $rowid = OCINewDescriptor($conn,OCI_D_ROWID); -OCIBindByName($stmt,":empno",&$empno,32); -OCIBindByName($stmt,":ename",&$ename,32); -OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID); +OCIBindByName($stmt,":empno",&$empno,32); +OCIBindByName($stmt,":ename",&$ename,32); +OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID); $update = OCIParse($conn,"update emp set sal = :sal where ROWID = :rid"); -OCIBindByName($update,":rid",&$rowid,-1,OCI_B_ROWID); -OCIBindByName($update,":sal",&$sal,32); +OCIBindByName($update,":rid",&$rowid,-1,OCI_B_ROWID); +OCIBindByName($update,":sal",&$sal,32); $sal = 10000; @@ -328,7 +308,7 @@ $stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)"); OCIExecute($stmt); -while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) { +while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) { var_dump($arr); } OCIFreeStatement($stmt); @@ -340,6 +320,7 @@ OCILogoff($conn); ?> +]]> </programlisting> </example> <warning> @@ -395,16 +376,16 @@ <example> <title>OCILogon</title> <programlisting> -<?php -print "<HTML><PRE>"; +<![CDATA[ +<?php +print "<HTML><PRE>"; $db = ""; $c1 = ocilogon("scott","tiger",$db); $c2 = ocilogon("scott","tiger",$db); function create_table($conn) -{ - $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); +{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))"); ociexecute($stmt); echo $conn." created table\n\n"; } @@ -416,8 +397,7 @@ } function insert_data($conn) -{ - $stmt = ociparse($conn,"insert into scott.hallo +{ $stmt = ociparse($conn,"insert into scott.hallo values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); ociexecute($stmt,OCI_DEFAULT); echo $conn." inserted hallo\n\n"; @@ -431,7 +411,7 @@ function commit($conn) { ocicommit($conn); - echo $conn." commited\n\n"; + echo $conn." committed\n\n"; } function rollback($conn) @@ -444,51 +424,56 @@ ociexecute($stmt,OCI_DEFAULT); echo $conn."----selecting\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; echo $conn."----done\n\n"; } create_table($c1); -insert_data($c1); // c1 ãç¨ãã¦è¡ãæ¿å ¥ -insert_data($c2); // c2 ãç¨ãã¦è¡ãæ¿å ¥ +insert_data($c1); // Insert a row using c1 +insert_data($c2); // Insert a row using c2 -select_data($c1); // 両æ¹ã®æ¿å ¥ã®çµæãè¿ã +select_data($c1); // Results of both inserts are returned select_data($c2); -rollback($c1); // c1 ãç¨ãã¦ãã¼ã«ãã㯠+rollback($c1); // Rollback using c1 -select_data($c1); // 両æ¹ã®æ¿å ¥ããã¼ã«ããã¯ããã +select_data($c1); // Both inserts have been rolled back select_data($c2); -insert_data($c2); // c2 ãç¨ãã¦è¡ãæ¿å ¥ -commit($c2); // c2 ãç¨ãã¦ã³ããã +insert_data($c2); // Insert a row using c2 +commit($c2); // commit using c2 -select_data($c1); // æ¿å ¥ c2 ã®çµæãè¿ããã +select_data($c1); // result of c2 insert is returned -delete_data($c1); // c1 ãç¨ãã¦ãã¼ãã«ã®å ¨ã¦ã®è¡ãåé¤ -select_data($c1); // è¡ãè¿ããªã -select_data($c2); // è¡ãè¿ããªã -commit($c1); // c1 ãç¨ãã¦ã³ããã +delete_data($c1); // delete all rows in table using c1 +select_data($c1); // no rows returned +select_data($c2); // no rows returned +commit($c1); // commit using c1 -select_data($c1); // è¡ãè¿ããªã -select_data($c2); // è¡ãè¿ããªã +select_data($c1); // no rows returned +select_data($c2); // no rows returned drop_table($c1); -print "</PRE></HTML>"; -?></programlisting></example></para> +print "</PRE></HTML>"; +?> +]]> + </programlisting> + </example> + </para> <simpara> <function>OCIPLogon</function> ããã³ - <function>OCINLogon</function> ãåç §ä¸ããã</simpara> + <function>OCINLogon</function> ãåç §ä¸ããã + </simpara> </refsect1> </refentry> - + <refentry id="function.ociplogon"> <refnamediv> <refname>OCIPLogon</refname> <refpurpose> - æç¶çæ¥ç¶ã使ç¨ãã¦Oracle ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã°ãªã³ããã - æ°ããã»ãã·ã§ã³ãè¿ãã + æç¶çæ¥ç¶ã使ç¨ãã¦Oracle ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã°ãªã³ããã + æ°ããã»ãã·ã§ã³ãè¿ãã </refpurpose> </refnamediv> <refsect1> @@ -516,7 +501,8 @@ </para> <simpara> <function>OCILogon</function> ããã³ - <function>OCINLogon</function> ãåç §ä¸ããã</simpara> + <function>OCINLogon</function> ãåç §ä¸ããã + </simpara> </refsect1> </refentry> @@ -564,94 +550,89 @@ 以ä¸ã®ä¾ã¯ãæ¥ç¶ãã©ã®ããã«åå²ããããã示ããã®ã§ãã <example> <title>OCINLogon</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>"; + <programlisting> +<![CDATA[ +<?php +print "<HTML><PRE>"; $db = ""; -$c1 = ocilogon ("scott", "tiger", $db); -$c2 = ocinlogon ("scott", "tiger", $db); +$c1 = ocilogon("scott","tiger",$db); +$c2 = ocinlogon("scott","tiger",$db); function create_table($conn) -{ - $stmt = ociparse ($conn, "create table scott.hallo (test - varchar2(64))"); - ociexecute ($stmt); +{ $stmt = ociparse($conn,"create table scott.hallo (test +varchar2(64))"); + ociexecute($stmt); echo $conn." created table\n\n"; } function drop_table($conn) -{ - $stmt = ociparse ($conn,"drop table scott.hallo"); - ociexecute ($stmt); +{ $stmt = ociparse($conn,"drop table scott.hallo"); + ociexecute($stmt); echo $conn." dropped table\n\n"; } function insert_data($conn) -{ - $stmt = ociparse($conn,"insert into scott.hallo values('$conn' || - ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); - ociexecute ($stmt,OCI_DEFAULT); +{ $stmt = ociparse($conn,"insert into scott.hallo + values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))"); + ociexecute($stmt,OCI_DEFAULT); echo $conn." inserted hallo\n\n"; } function delete_data($conn) -{ - $stmt = ociparse ($conn,"delete from scott.hallo"); - ociexecute ($stmt,OCI_DEFAULT); +{ $stmt = ociparse($conn,"delete from scott.hallo"); + ociexecute($stmt,OCI_DEFAULT); echo $conn." deleted hallo\n\n"; } function commit($conn) -{ - ocicommit($conn); - echo $conn." commited\n\n"; +{ ocicommit($conn); + echo $conn." committed\n\n"; } function rollback($conn) -{ - ocirollback($conn); +{ ocirollback($conn); echo $conn." rollback\n\n"; } function select_data($conn) -{ - $stmt = ociparse ($conn, "select * from scott.hallo"); - ociexecute ($stmt, OCI_DEFAULT); +{ $stmt = ociparse($conn,"select * from scott.hallo"); + ociexecute($stmt,OCI_DEFAULT); echo $conn."----selecting\n\n"; while (ocifetch($stmt)) - echo $conn." <".ociresult($stmt,"TEST").">\n\n"; + echo $conn." <".ociresult($stmt,"TEST").">\n\n"; echo $conn."----done\n\n"; } -create_table ($c1); -insert_data ($c1); +create_table($c1); +insert_data($c1); -select_data ($c1); -select_data ($c2); +select_data($c1); +select_data($c2); -rollback ($c1); +rollback($c1); -select_data ($c1); -select_data ($c2); +select_data($c1); +select_data($c2); -insert_data ($c2); -commit ($c2); +insert_data($c2); +commit($c2); -select_data ($c1); +select_data($c1); -delete_data ($c1); -select_data ($c1); -select_data ($c2); -commit ($c1); +delete_data($c1); +select_data($c1); +select_data($c2); +commit($c1); -select_data ($c1); -select_data ($c2); +select_data($c1); +select_data($c2); -drop_table ($c1); -print "</PRE></HTML>"; +drop_table($c1); +print "</PRE></HTML>"; ?> +]]> </programlisting> </example> </para> @@ -782,8 +763,9 @@ </para> <example> <title>OCINewDescriptor</title> - <programlisting role="php"> -<?php + <programlisting> +<![CDATA[ +<?php /* ãã®ã¹ã¯ãªãã㯠HTML ãã©ã¼ã ããã³ã¼ã«ãããåæã§ä½æ * ããã¦ããã$user, $passwor, $table, $where, $commitsize * ããã©ã¼ã ããæ¸¡ããããã¨ãåæã«ãã¦ãã¾ãã @@ -794,7 +776,7 @@ $conn = OCILogon($user, $password); $stmt = OCIParse($conn,"select rowid from $table $where"); $rowid = OCINewDescriptor($conn,OCI_D_ROWID); - OCIDefineByName($stmt,"ROWID",&$rowid); + OCIDefineByName($stmt,"ROWID",$rowid); OCIExecute($stmt); while ( OCIFetch($stmt) ) { $nrows = OCIRowCount($stmt); @@ -810,29 +792,32 @@ print "$nrows deleted...\n"; OCIFreeStatement($stmt); OCILogoff($conn); -?> +?> +]]> </programlisting> <programlisting> -<?php +<![CDATA[ +<?php /* ãã®ã¹ã¯ãªãããLOB ã«ã©ã ã«ãã¡ã¤ã«ãã¢ãããã¼ãããä¾ã示ãã¾ãã * LOBã«ã©ã ã«ã¢ãããã¼ããè¡ããã®ä¾ã«é¢ãããã©ã¼ã ã¯ã - * <input type="file" name="lob_upload"> + * <form action="upload.php3" method="post" enctype="multipart/form-data"> + * <input type="file" name="lob_upload"> * ... ã®ãããªãã®ã使ç¨ããã¾ãã */ if(!isset($lob_upload) || $lob_upload == 'none'){ ?> -<form action="upload.php3" method="post" enctype="multipart/form-data"> -Upload file: <input type="file" name="lob_upload"><br> -<input type="submit" value="Upload"> - <input type="reset"> -</form> -<?php +<form action="upload.php3" method="post" enctype="multipart/form-data"> +Upload file: <input type="file" name="lob_upload"><br> +<input type="submit" value="Upload"> - <input type="reset"> +</form> +<?php } else { // $lob_upload ã¯ã¢ãããã¼ããã¡ã¤ã«ã®ãã³ãã©ãªãã¡ã¤ã«åãæãã¦ãã¾ã $conn = OCILogon($user, $password); $lob = OCINewDescriptor($conn, OCI_D_LOB); $stmt = OCIParse($conn,"insert into $table (id, the_blob) values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob"); - OCIBindByName($stmt, ':the_blob', &$lob, -1, OCI_B_BLOB); + OCIBindByName($stmt, ':the_blob', $lob, -1, OCI_B_BLOB); OCIExecute($stmt); if($lob->savefile($lob_upload)){ OCICommit($conn); @@ -845,6 +830,39 @@ OCILogoff($conn); } ?> +]]> + </programlisting> + </example> + <example> + <title>OCINewDescriptor</title> + <programlisting> +<![CDATA[ +<?php + /* Calling PL/SQL stored procedures which contain clobs as input + * parameters (PHP 4 >= 4.0.6). + * Example PL/SQL stored procedure signature is: + * + * PROCEDURE save_data + * Argument Name Type In/Out Default? + * ------------------------------ ----------------------- ------ -------- + * KEY NUMBER(38) IN + * DATA CLOB IN + * + */ + + $conn = OCILogon($user, $password); + $stmt = OCIParse($conn, "begin save_data(:key, :data); end;"); + $clob = OCINewDescriptor($conn, OCI_D_LOB); + OCIBindByName($stmt, ':key', $key); + OCIBindByName($stmt, ':data', $clob, -1, OCI_B_CLOB); + $clob->WriteTemporary($data); + OCIExecute($stmt, OCI_DEFAULT); + OCICommit($conn); + $clob->close(); + $clob->free(); + OCIFreeStatement($stmt); +?> +]]> </programlisting> </example> </refsect1> @@ -870,25 +888,27 @@ <para> <example> <title>OCIRowCount</title> - <programlisting role="php"> -<?php - print "<HTML><PRE>"; + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>"; $conn = OCILogon("scott","tiger"); $stmt = OCIParse($conn,"create table emp2 as select * from emp"); OCIExecute($stmt); - print OCIRowCount($stmt) . " rows inserted.<BR>"; + print OCIRowCount($stmt) . " rows inserted.<BR>"; OCIFreeStatement($stmt); $stmt = OCIParse($conn,"delete from emp2"); OCIExecute($stmt); - print OCIRowCount($stmt) . " rows deleted.<BR>"; + print OCIRowCount($stmt) . " rows deleted.<BR>"; OCICommit($conn); OCIFreeStatement($stmt); $stmt = OCIParse($conn,"drop table emp2"); OCIExecute($stmt); OCIFreeStatement($stmt); OCILogOff($conn); - print "</PRE></HTML>"; -?> + print "</PRE></HTML>"; +?> +]]> </programlisting> </example> </para> @@ -914,27 +934,29 @@ </para> <example> <title>OCINumCols</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>\n"; -$conn = OCILogon ("scott", "tiger"); -$stmt = OCIParse ($conn,"select * from emp"); -OCIExecute ($stmt); -while (OCIFetch ($stmt)) { - print "\n"; - $ncols = OCINumCols ($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName ($stmt, $i); - $column_value = OCIResult ($stmt, $i); - print $column_name . ': ' . $column_value . "\n"; - } - print "\n"; -} -OCIFreeStatement ($stmt); -OCILogoff ($conn); -print "</PRE>"; -print "</HTML>\n"; + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + while ( OCIFetch($stmt) ) { + print "\n"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_value = OCIResult($stmt,$i); + print $column_name . ': ' . $column_value . "\n"; + } + print "\n"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; ?> +]]> </programlisting> </example> </refsect1> @@ -1018,15 +1040,21 @@ æå®å¯è½ãªãã©ã°ã次ã«ç¤ºãã¾ãã <simplelist> - <member><literal>OCI_ASSOC</literal> 飿³é åãè¿ãã</member> - <member><literal>OCI_NUM</literal> æ·»å 1 ããå§ã¾ãé åãè¿ãã(ããã©ã«ã)</member> - <member><literal>OCI_RETURN_NULLS</literal> 空ã®ã«ã©ã ãè¿ãã</member> - <member><literal>OCI_RETURN_LOBS</literal> ãã£ã¹ã¯ãªãã¿ã®ä»£ããã« LOB ã®å¤ãè¿ãã</member> + <member> + <literal>OCI_ASSOC</literal> 飿³é åãè¿ãã + </member> + <member> + <literal>OCI_NUM</literal> æ·»å 1 ããå§ã¾ãé åãè¿ãã(ããã©ã«ã) + </member> + <member> + <literal>OCI_RETURN_NULLS</literal> 空ã®ã«ã©ã ãè¿ãã + </member> + <member> + <literal>OCI_RETURN_LOBS</literal> ãã£ã¹ã¯ãªãã¿ã®ä»£ããã« LOB + ã®å¤ãè¿ãã + </member> </simplelist> - - </para> - <para> - </para> + </para> </refsect1> </refentry> @@ -1051,44 +1079,45 @@ </para> <example> <title>OCIFetchStatement</title> - <programlisting role="php"> -<?php + <programlisting> +<![CDATA[ +<?php /* OCIFetchStatement example mbritton@verinet.com (990624) */ -$conn = OCILogon ("scott", "tiger"); +$conn = OCILogon("scott","tiger"); -$stmt = OCIParse ($conn, "select * from emp"); +$stmt = OCIParse($conn,"select * from emp"); -OCIExecute ($stmt); +OCIExecute($stmt); -$nrows = OCIFetchStatement ($stmt,$results); -if ($nrows > 0) { - print "<TABLE BORDER=\"1\">\n"; - print "<TR>\n"; +$nrows = OCIFetchStatement($stmt,$results); +if ( $nrows > 0 ) { + print "<TABLE BORDER=\"1\">\n"; + print "<TR>\n"; while ( list( $key, $val ) = each( $results ) ) { - print "<TH>$key</TH>\n"; + print "<TH>$key</TH>\n"; } - print "</TR>\n"; + print "</TR>\n"; - for ( $i = 0; $i < $nrows; $i++ ) { - reset ($results); - print "<TR>\n"; - while ( $column = each ($results) ) { + for ( $i = 0; $i < $nrows; $i++ ) { + reset($results); + print "<TR>\n"; + while ( $column = each($results) ) { $data = $column['value']; - print "<TD>$data[$i]</TD>\n"; + print "<TD>$data[$i]</TD>\n"; } - print "</TR>\n"; + print "</TR>\n"; } - print "</TABLE>\n"; + print "</TABLE>\n"; } else { - echo "No data found<BR>\n"; + echo "No data found<BR>\n"; } -print "$nrows Records Selected<BR>\n"; +print "$nrows Records Selected<BR>\n"; -OCIFreeStatement ($stmt); -OCILogoff ($conn); - +OCIFreeStatement($stmt); +OCILogoff($conn); ?> +]]> </programlisting> </example> </refsect1> @@ -1118,6 +1147,67 @@ </refsect1> </refentry> + <refentry id="function.ocicolumnname"> + <refnamediv> + <refname>OCIColumnName</refname> + <refpurpose>ã«ã©ã ã®ååãè¿ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>OCIColumnName</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnName</function> ã¯æå®ãã(1ããå§ã¾ã)ã«ã©ã + çªå·ã«å¯¾å¿ããã«ã©ã ã®ååãè¿ãã¾ãã + </simpara> + <para> + <example> + <title>OCIColumnName</title> + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> + </programlisting> + </example> + </para> + <simpara> + <function>OCINumCols</function>, <function>OCIColumnType</function>, + <function>OCIColumnSize</function>ãåç §ä¸ããã + </simpara> + </refsect1> + </refentry> + <refentry id="function.ocicolumnsize"> <refnamediv> <refname>OCIColumnSize</refname> @@ -1133,42 +1223,44 @@ </funcprototype> </funcsynopsis> <para> - <function>OCIColumnSize</function>ã¯Oracleã«ããæå®ãããã«ã©ã ã®ãµã¤ãºã - è¿ãã¾ãã - <parameter>col</parameter>ãã©ã¡ã¼ã¿ã«(1ããå§ã¾ã)ã«ã©ã çªå·ã¾ã㯠- ã«ã©ã åã®ã©ã¡ããã使ç¨å¯è½ã§ãã + <function>OCIColumnSize</function>ã¯Oracleã«ããæå®ãããã«ã©ã + ã®ãµã¤ãºãè¿ãã¾ãã<parameter>col</parameter>ãã©ã¡ã¼ã¿ã«(1ãã + å§ã¾ã)ã«ã©ã çªå·ã¾ãã¯ã«ã©ã åã®ã©ã¡ããã使ç¨å¯è½ã§ãã </para> <para> <example> <title>OCIColumnSize</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>\n"; -$conn = OCILogon ("scott", "tiger"); -$stmt = OCIParse ($conn, "select * from emp"); -OCIExecute ($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>Name</TH>"; -print "<TH>Type</TH>"; -print "<TH>Length</TH>"; -print "</TR>"; -$ncols = OCINumCols ($stmt); -for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName ($stmt, $i); - $column_type = OCIColumnType ($stmt, $i); - $column_size = OCIColumnSize ($stmt, $i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; -} -OCIFreeStatement ($stmt); -OCILogoff ($conn); -print "</PRE>"; -print "</HTML>\n"; + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + print "</TABLE>"; + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; ?> +]]> </programlisting> </example> </para> @@ -1179,6 +1271,67 @@ </refsect1> </refentry> + <refentry id="function.ocicolumntype"> + <refnamediv> + <refname>OCIColumnType</refname> + <refpurpose>ã«ã©ã ã®ãã¼ã¿åãè¿ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>mixed <function>OCIColumnType</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>int <parameter>col</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + <function>OCIColumnType</function>ã¯ãæå®ãã(1ããå§ã¾ã)ã«ã©ã + çªå·ã«å¯¾å¿ããã«ã©ã ã®ãã¼ã¿åãè¿ãã¾ãã + </simpara> + <para> + <example> + <title>OCIColumnType</title> + <programlisting> +<![CDATA[ +<?php + print "<HTML><PRE>\n"; + $conn = OCILogon("scott", "tiger"); + $stmt = OCIParse($conn,"select * from emp"); + OCIExecute($stmt); + print "<TABLE BORDER=\"1\">"; + print "<TR>"; + print "<TH>Name</TH>"; + print "<TH>Type</TH>"; + print "<TH>Length</TH>"; + print "</TR>"; + $ncols = OCINumCols($stmt); + for ( $i = 1; $i <= $ncols; $i++ ) { + $column_name = OCIColumnName($stmt,$i); + $column_type = OCIColumnType($stmt,$i); + $column_size = OCIColumnSize($stmt,$i); + print "<TR>"; + print "<TD>$column_name</TD>"; + print "<TD>$column_type</TD>"; + print "<TD>$column_size</TD>"; + print "</TR>"; + } + OCIFreeStatement($stmt); + OCILogoff($conn); + print "</PRE>"; + print "</HTML>\n"; +?> +]]> + </programlisting> + </example> + </para> + <simpara> + <function>OCINumCols</function>, <function>OCIColumnName</function>, + <function>OCIColumnSize</function> ãåç §ä¸ããã + </simpara> + </refsect1> + </refentry> + <refentry id="function.ociserverversion"> <refnamediv> <refname>OCIServerVersion</refname> @@ -1195,12 +1348,14 @@ <para> <example> <title>OCIServerVersion</title> - <programlisting role="php"> -<?php -$conn = OCILogon ("scott", "tiger"); -print "Server Version: " . OCIServerVersion($conn); -OCILogOff ($conn); + <programlisting> +<![CDATA[ +<?php + $conn = OCILogon("scott","tiger"); + print "Server Version: " . OCIServerVersion($conn); + OCILogOff($conn); ?> +]]> </programlisting> </example> </para> @@ -1279,19 +1434,21 @@ <example> <title>ã³ã¼ãã£ã³ã°ä¾</title> <programlisting role="php"> -<?php -print "<HTML><PRE>"; -$conn = OCILogon ("scott", "tiger"); -$sql = "delete from emp where deptno = 10"; +<![CDATA[ +<?php + print "<HTML><PRE>"; + $conn = OCILogon("scott","tiger"); + $sql = "delete from emp where deptno = 10"; -$stmt = OCIParse ($conn,$sql); -if (OCIStatementType ($stmt) == "DELETE" ) { - die "You are not allowed to delete from this table<BR>"; -} + $stmt = OCIParse($conn,$sql); + if ( OCIStatementType($stmt) == "DELETE" ) { + die "You are not allowed to delete from this table<BR>"; + } -OCILogoff ($conn); -print "</PRE></HTML>"; + OCILogoff($conn); + print "</PRE></HTML>"; ?> +]]> </programlisting> </example> </para> @@ -1321,66 +1478,70 @@ <para> <example> <title>ã¹ãã¢ãããã·ã¼ã¸ã£ããã®åç §ã«ã¼ã½ã«ã®ä½¿ç¨ä¾</title> - <programlisting role="php"> -<?php + <programlisting> +<![CDATA[ +<?php // ã¹ãã¢ãããã·ã¼ã¸ã£ info.output ã :data ã®åç §ã«ã¼ã½ã«ãè¿ãã¨ä»®å®ãã -$conn = OCILogon ("scott", "tiger"); -$curs = OCINewCursor ($conn); -$stmt = OCIParse ($conn, "begin info.output(:data); end;"); +$conn = OCILogon("scott","tiger"); +$curs = OCINewCursor($conn); +$stmt = OCIParse($conn, "begin info.output(:data); end;"); -ocibindbyname ($stmt,"data",&$curs,-1,OCI_B_CURSOR); -ociexecute ($stmt); -ociexecute ($curs); +ocibindbyname($stmt,"data",$curs,-1,OCI_B_CURSOR); +ociexecute($stmt); +ociexecute($curs); -while (OCIFetchInto($curs,&$data)) { +while (OCIFetchInto($curs,$data)) { var_dump($data); } -OCIFreeStatement ($stmt); -OCIFreeCursor ($curs); -OCILogoff ($conn); - ?> +OCIFreeStatement($stmt); +OCIFreeCursor($curs); +OCILogoff($conn); +?> +]]> </programlisting> </example> </para> <para> <example> - <title>selectæã«ãããåç §ã«ã¼ã½ã«ã®ä½¿ç¨ä¾</title> - <programlisting role="php"> -<?php -print "<HTML><BODY>"; -$conn = OCILogon ("scott","tiger"); + <title>selectæã«ãããREF CURSORã®ä½¿ç¨ä¾</title> + <programlisting> +<![CDATA[ +<?php +print "<HTML><BODY>"; +$conn = OCILogon("scott","tiger"); $count_cursor = "CURSOR(select count(empno) num_emps from emp " . "where emp.deptno = dept.deptno) as EMPCNT from dept"; -$stmt = OCIParse ($conn,"select deptno,dname,$count_cursor"); - -ociexecute ($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>DEPT NAME</TH>"; -print "<TH>DEPT #</TH>"; -print "<TH># EMPLOYEES</TH>"; -print "</TR>"; +$stmt = OCIParse($conn,"select deptno,dname,$count_cursor"); -while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { - print "<TR>"; +ociexecute($stmt); +print "<TABLE BORDER=\"1\">"; +print "<TR>"; +print "<TH>DEPT NAME</TH>"; +print "<TH>DEPT #</TH>"; +print "<TH># EMPLOYEES</TH>"; +print "</TR>"; + +while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) { + print "<TR>"; $dname = $data["DNAME"]; $deptno = $data["DEPTNO"]; - print "<TD>$dname</TD>"; - print "<TD>$deptno</TD>"; + print "<TD>$dname</TD>"; + print "<TD>$deptno</TD>"; ociexecute($data[ "EMPCNT" ]); - while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) { + while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) { $num_emps = $subdata["NUM_EMPS"]; - print "<TD>$num_emps</TD>"; + print "<TD>$num_emps</TD>"; } - print "</TR>"; + print "</TR>"; } -print "</TABLE>"; -print "</BODY></HTML>"; +print "</TABLE>"; +print "</BODY></HTML>"; OCIFreeStatement($stmt); OCILogoff($conn); ?> +]]> </programlisting> </example> </para> @@ -1447,124 +1608,6 @@ </refsect1> </refentry> - <refentry id="function.ocicolumnname"> - <refnamediv> - <refname>OCIColumnName</refname> - <refpurpose>ã«ã©ã ã®ååãè¿ã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>OCIColumnName</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnName</function> ã¯æå®ãã(1ããå§ã¾ã)ã«ã©ã - çªå·ã«å¯¾å¿ããã«ã©ã ã®ååãè¿ãã¾ãã - </simpara> - <para> - <example> - <title>OCIColumnName</title> - <programlisting role="php"> -<?php -print "<HTML><PRE>\n"; -$conn = OCILogon ("scott", "tiger"); -$stmt = OCIParse ($conn,"select * from emp"); -OCIExecute ($stmt); -print "<TABLE BORDER=\"1\">"; -print "<TR>"; -print "<TH>Name</TH>"; -print "<TH>Type</TH>"; -print "<TH>Length</TH>"; -print "</TR>"; -$ncols = OCINumCols ($stmt); -for ($i = 1; $i <= $ncols; $i++) { - $column_name = OCIColumnName ($stmt, $i); - $column_type = OCIColumnType ($stmt, $i); - $column_size = OCIColumnSize ($stmt, $i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; -} -OCIFreeStatement ($stmt); -OCILogoff ($conn); -print "</PRE>"; -print "</HTML>\n"; -?> - </programlisting> - </example> - </para> - <simpara> - <function>OCINumCols</function>, <function>OCIColumnType</function>, - <function>OCIColumnSize</function>ãåç §ä¸ããã - </simpara> - </refsect1> - </refentry> - - <refentry id="function.ocicolumntype"> - <refnamediv> - <refname>OCIColumnType</refname> - <refpurpose>ã«ã©ã ã®ãã¼ã¿åãè¿ã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>mixed <function>OCIColumnType</function></funcdef> - <paramdef>int <parameter>stmt</parameter></paramdef> - <paramdef>int <parameter>col</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>OCIColumnType</function>ã¯ãæå®ãã(1ããå§ã¾ã)ã«ã©ã - çªå·ã«å¯¾å¿ããã«ã©ã ã®ãã¼ã¿åãè¿ãã¾ãã - </simpara> - <para> - <example> - <title>OCIColumnType</title> - <programlisting role="php"> -<?php - print "<HTML><PRE>\n"; - $conn = OCILogon("scott", "tiger"); - $stmt = OCIParse($conn,"select * from emp"); - OCIExecute($stmt); - print "<TABLE BORDER=\"1\">"; - print "<TR>"; - print "<TH>Name</TH>"; - print "<TH>Type</TH>"; - print "<TH>Length</TH>"; - print "</TR>"; - $ncols = OCINumCols($stmt); - for ( $i = 1; $i <= $ncols; $i++ ) { - $column_name = OCIColumnName($stmt,$i); - $column_type = OCIColumnType($stmt,$i); - $column_size = OCIColumnSize($stmt,$i); - print "<TR>"; - print "<TD>$column_name</TD>"; - print "<TD>$column_type</TD>"; - print "<TD>$column_size</TD>"; - print "</TR>"; - } - OCIFreeStatement($stmt); - OCILogoff($conn); - print "</PRE>"; - print "</HTML>\n"; -?> - </programlisting> - </example> - </para> - <simpara> - <function>OCINumCols</function>, <function>OCIColumnName</function>, - <function>OCIColumnSize</function> ãåç §ä¸ããã - </simpara> - </refsect1> - </refentry> - <refentry id="function.ociparse"> <refnamediv> <refname>OCIParse</refname> @@ -1878,6 +1921,26 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>OCICollAssign</function></funcdef> + <paramdef>object <parameter>collection</parameter></paramdef> + <paramdef>object <parameter>object</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <simpara> + Coming soon. + </simpara> + </refsect1> + </refentry> + + <refentry id="function.ocicollappend"> + <refnamediv> + <refname>OCICollAppend</refname> + <refpurpose>Coming soon.</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>OCICollAppend</function></funcdef> <paramdef>object <parameter>collection</parameter></paramdef> <paramdef>object <parameter>object</parameter></paramdef> </funcprototype> Index: phpdoc/ja/functions/openssl.xml diff -u phpdoc/ja/functions/openssl.xml:1.11 phpdoc/ja/functions/openssl.xml:1.12 --- phpdoc/ja/functions/openssl.xml:1.11 Wed Dec 12 15:53:26 2001 +++ phpdoc/ja/functions/openssl.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.12 $ --> <reference id="ref.openssl"> <title>OpenSSL 颿°</title> <titleabbrev>OpenSSL</titleabbrev> @@ -10,7 +11,7 @@ ãã®ã¢ã¸ã¥ã¼ã«ã¯ãç½²åã®çæããã³èªè¨¼ãããã¦ããã¼ã¿ã®ã·ã¼ã« (æå·å)ããã³ãªã¼ãã³(復å·å)ãè¡ãããã«ã <ulink url="&url.openssl;">OpenSSL</ulink> ã®é¢æ°ã使ç¨ãã¾ããã - ã®ã¢ã¸ã¥ã¼ã«ã§ã¯ãPHP 4.0.4pl1 ã¯ãOpenSSL >= 0.9.6 ãå¿ è¦ã¨ãã¾ + ã®ã¢ã¸ã¥ã¼ã«ã§ã¯ãPHP 4.0.4pl1 ã¯ãOpenSSL >= 0.9.6 ãå¿ è¦ã¨ãã¾ ãããPHP-4.0.5以éã§ã¯ãOpenSSL >= 0.9.5 ã§ãåä½ãã¾ãã </para> <note> @@ -232,9 +233,10 @@ <funcsynopsis> <funcprototype> <funcdef>mixed <function>openssl_error_string</function></funcdef> - <paramdef>void<parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> ã¨ã©ã¼ã¡ãã»ã¼ã¸æååãè¿ãã¾ããè¿ãã¹ãã¨ã©ã¼ã¡ãã»ã¼ã¸ããã ãªãå ´åã¯ã&false; ãè¿ãã¾ãã @@ -255,9 +257,11 @@ <example> <title><function>openssl_error_string</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // ããã§å¦çã«å¤±æããOpenSSL颿°ãã³ã¼ã«ããã¨ä»®å®ãã¾ã while($msg = openssl_error_string) - echo $msg . "<br>"; + echo $msg . "<br />"; +]]> </programlisting> </example> </para> @@ -282,6 +286,7 @@ <paramdef>resource <parameter>key_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_free_key</function> ã¯ãæå®ãã <parameter>key_identifier</parameter> ãæããã¼ãã¡ã¢ãªããéæ¾ @@ -308,6 +313,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«æ£ã®ãã¼ãªã½ã¼ã¹IDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãã </para> @@ -336,6 +342,7 @@ <paramdef>mixed <parameter>certificate</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«æ£ã®ãã¼ãªã½ã¼ã¹IDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãã </para> @@ -363,6 +370,7 @@ <paramdef>mixed <parameter>priv_key_id</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«&true;ãã¨ã©ã¼æã«&false;ãè¿ãã¾ããæåããå ´åããªã¼ãã³ã ãããã¼ã¿ã <parameter>open_data</parameter> ã«è¿ããã¾ãã @@ -380,6 +388,7 @@ <example> <title><function>openssl_open</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $sealed ããã³ $env_key ã«æå·åããããã¼ã¿ããã³ã¨ã³ããã¼ããã¼ // ãå«ã¾ãã¦ããã¨ä»®å®ãå ±ã«ã·ã¼ã«å (æå·åå´)ããä¸ããããã @@ -397,6 +406,7 @@ // å ¬éãã¼ãã¡ã¢ãªããéæ¾ openssl_free_key($pkeyid); +]]> </programlisting> </example> </para> @@ -422,6 +432,7 @@ <paramdef>array <parameter>pub_key_ids</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«ã·ã¼ã«(æå·å)ããããã¼ã¿ã®é·ããã¨ã©ã¼æã«&false;ãè¿ãã¾ ããæåæã«ã¯ãæå·åããããã¼ã¿ã @@ -441,6 +452,7 @@ <example> <title><function>openssl_seal</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $data ã«ã¯ãæå·åããããã¼ã¿ãå«ã¾ãã¦ããã¨ä»®å® // åä¿¡è ã®å ¬éãã¼ãåå¾ãã使ç¨å¯è½ã«ãã @@ -448,6 +460,7 @@ $cert = fread($fp, 8192); fclose($fp); $pk1 = openssl_get_publickey($cert); + // 2çªç®ã®åä¿¡è ã«ã¤ãã¦ãåæ§ $fp = fopen("/src/openssl-0.9.6/demos/sign/cert.pem", "r"); $cert = fread($fp, 8192); @@ -462,6 +475,7 @@ // ãã¼ãã¡ã¢ãªããéæ¾ãã openssl_free_key($pk1); openssl_free_key($pk2); +]]> </programlisting> </example> </para> @@ -486,6 +500,7 @@ <paramdef>int <parameter>priv_key_id</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> æåæã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ããæåããå ´åãç½²åã <parameter>signature</parameter> ã«è¿ããã¾ãã @@ -501,6 +516,7 @@ <example> <title><function>openssl_sign</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $data ã«ç½²åãããã¼ã¿ãå«ã¾ãã¦ããã¨ä»®å® // ãã¡ã¤ã«ããå ¬éãã¼ãåå¾ãã使ç¨å¯è½ã¨ãã @@ -514,6 +530,7 @@ // ã¡ã¢ãªãããã¼ãéæ¾ãã openssl_free_key($pkeyid); +]]> </programlisting> </example> </para> @@ -538,6 +555,7 @@ <paramdef>mixed <parameter>pub_key_id</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> ç½²å(signature)ãæ£ããå ´åã« 1ãæ£ãããªãå ´åã« 0ãã¨ã©ã¼ã®å ´å ã« -1 ãè¿ãã¾ãã @@ -554,6 +572,7 @@ <example> <title><function>openssl_verify</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $data ããã³ $signature ã¯ãã¼ã¿ããã³ç½²åãå«ã¾ãã¦ããã¨ä»®å® // èªè¨¼å±ããå ¬éãã¼ãåå¾ãã使ç¨å¯è½ã«ãã @@ -573,6 +592,7 @@ // ã¡ã¢ãªãããã¼ãéæ¾ openssl_free_key($pubkeyid); +]]> </programlisting> </example> </para> @@ -598,6 +618,7 @@ <paramdef>mixed <parameter>recipkey</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <parameter>infilename</parameter>ã§æå®ãããã¡ã¤ã«ä¸ã®S/MIMEæå· åãããã¡ãã»ã¼ã¸ãã<parameter>recipcert</parameter> ããã³ @@ -618,6 +639,7 @@ <example> <title><function>openssl_pkcs7_decrypt</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // $cert ããã³ $key ã«ã¯ããªãã®åäººè¨¼ææ¸ã¨å ¬éãã¼ãå«ã¾ãã¦ããã // ããªãã¯S/MIMEã¡ãã»ã¼ã¸ã®åä¿¡è ã§ããã¨ä»®å®ãã¾ãã $infilename = "encrypted.msg"; // æå·åãããã¡ãã»ã¼ã¸ãå«ããã¡ã¤ã« @@ -627,7 +649,7 @@ echo "復å·åããã¾ãã!"; else echo "復å·åã«å¤±æãã¾ãã!"; - +]]> </programlisting> </example> </para> @@ -658,6 +680,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_pkcs7_encrypt</function> ã¯ã <parameter>infilename</parameter> ã¨ããååã®ãã¡ã¤ã«ã®å 容ã @@ -674,19 +697,14 @@ ã¦ãã¾ãã </para> <para> - <emphasis> - ãã®é¢æ°ã®ãã©ã¡ã¼ã¿/è¿ãå¤ã¯ãPHPã®ãªãªã¼ã¹çãå ¬éãããã¾ã§ã« - 夿´ãããå¯è½æ§ãããã¾ãã - </emphasis> - </para> - <para> <example> <title><function>openssl_pkcs7_encrypt</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // æå·åããã¡ãã»ã¼ã¸ã nighthawk ã¨ããååã®å¤é¨ã®ç§å¯ã®ã¨ã¼ // ã¸ã§ã³ãã«éä¿¡ãã¾ããéä¿¡å ã®è¨¼ææ¸ããã¡ã¤ã« nighthawk.pem ã«æã // ã¦ãã¾ãã -$data = <<<EOD +$data = <<<EOD Nighthawk, Top secret, for your eyes only! @@ -702,13 +720,14 @@ fclose($fp); // ã¡ãã»ã¼ã¸ãæå·å if (openssl_pkcs7_encrypt("msg.txt", "enc.txt", "nighthawk.pem", - array("To" => "nighthawk@agent.com", // 飿³é åã®æ§æ - "From: HQ <hq@cia.com>", // æ·»åé åã®æ§æ - "Subject" => "Eyes only"))) + array("To" => "nighthawk@agent.com", // 飿³é åã®æ§æ + "From: HQ <hq@cia.com>", // æ·»åé åã®æ§æ + "Subject" => "Eyes only"))) { // ã¡ãã»ã¼ã¸ãæå·åããéä¿¡ãã¾ã! - exec(ini_get("sendmail_path") . " < enc.txt"); + exec(ini_get("sendmail_path") . " < enc.txt"); } +]]> </programlisting> </example> </para> @@ -742,6 +761,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_pkcs7_sign</function>ã¯ã <parameter>infilename</parameter> ã¨ããååã®ãã¡ã¤ã«ã®å 容ã«ã¤ @@ -769,18 +789,12 @@ ãå¯è½ã§ãã </para> <para> - <emphasis> - ãã®é¢æ°ã®ãã©ã¡ã¼ã¿/è¿ãå¤ã®åã¯ãPHPã®ãªãªã¼ã¹çãå ¬éãããå - ã«å¤æ´ãããå¯è½æ§ãããã¾ãã - </emphasis> - </para> - - <para> <example> <title><function>openssl_pkcs7_sign</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // åä¿¡è ãéä¿¡è ã確èªã§ããããã«ãµã¤ã³ãããã¡ãã»ã¼ã¸ -$data = <<<EOD +$data = <<<EOD You have my authorization to spend $10,000 on dinner expenses. @@ -794,13 +808,14 @@ // æå·å if (openssl_pkcs7_sign("msg.txt", "signed.txt", "mycert.pem", array("mycert.pem", "mypassphrase"), - array("To" => "joes@sales.com", // keyed syntax - "From: HQ <ceo@sales.com>", // indexed syntax - "Subject" => "Eyes only")) + array("To" => "joes@sales.com", // keyed syntax + "From: HQ <ceo@sales.com>", // indexed syntax + "Subject" => "Eyes only")) { // ã¡ãã»ã¼ã¸ã¯ãµã¤ã³ããã¾ãããéä¿¡ãã¾ããã! - exec(ini_get("sendmail_path") . " < signed.txt"); + exec(ini_get("sendmail_path") . " < signed.txt"); } +]]> </programlisting> </example> </para> @@ -835,6 +850,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_pkcs7_verify</function> ã¯ã <parameter>filename</parameter> ã§æå®ãããã¡ã¤ã«ã«è¨è¿°ããã @@ -899,6 +915,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> è¨¼ææ¸ãæå³ããç®çã«ä½¿ç¨å¯è½ã§ããå ´åã« &true;ã使ç¨ã§ããªãå ´å ã« &false; ãã¨ã©ã¼ã®å ´åã« -1 ãè¿ãã¾ãã @@ -1007,6 +1024,7 @@ <paramdef>resource <parameter>x509cert</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_x509_free</function> ã¯ãã¡ã¢ãªããæå®ãã <parameter>x509cert</parameter> ãªã½ã¼ã¹ã«é¢é£ããè¨¼ææ¸ãéæ¾ã @@ -1037,6 +1055,7 @@ <parameter><optional>shortnames</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_x509_parse</function> ã¯ãæå®ãã <parameter>x509cert</parameter> ã«é¢ããæ å ±ãè¿ãã¾ãããã®æ å ± @@ -1076,6 +1095,7 @@ <paramdef>mixed <parameter>x509certdata</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>openssl_x509_read</function> ã¯ã <parameter>x509certdata</parameter> ã§æå®ããè¨¼ææ¸ããã¼ã¹ãã @@ -1088,6 +1108,354 @@ </note> </refsect1> </refentry> + + <refentry id="function.openssl-x509-export-to-file"> + <refnamediv> + <refname>openssl_x509_export_to_file</refname> + <refpurpose>CERTããã¡ã¤ã«ã¾ãã¯å¤æ°ã«ã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_x509_export_to_file</function></funcdef> + <paramdef>mixed <parameter>x509</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-x509-export"> + <refnamediv> + <refname>openssl_x509_export</refname> + <refpurpose>CERTããã¡ã¤ã«ã¾ãã¯å¤æ°ãã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_x509_export</function></funcdef> + <paramdef>mixed <parameter>x509</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-x509-check-private-key"> + <refnamediv> + <refname>openssl_x509_check_private_key</refname> + <refpurpose>ç§å¯ãã¼ãããCERTã«å¯¾å¿ãããã確èªãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_x509_check_private_key</function></funcdef> + <paramdef>mixed <parameter>cert</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-export-to-file"> + <refnamediv> + <refname>openssl_csr_export_to_file</refname> + <refpurpose>CSRããã¡ã¤ã«ã¾ãã¯å¤æ°ã«ã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_csr_export_to_file</function></funcdef> + <paramdef>resource <parameter>csr</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-export"> + <refnamediv> + <refname>openssl_csr_export</refname> + <refpurpose>CSRããã¡ã¤ã«ã¾ãã¯å¤æ°ã«ã¨ãã¹ãã¼ããã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_csr_export</function></funcdef> + <paramdef>resource <parameter>csr</parameter></paramdef> + <paramdef>string <parameter>out</parameter></paramdef> + <paramdef>bool + <parameter><optional>notext</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-sign"> + <refnamediv> + <refname>openssl_csr_sign</refname> + <refpurpose>ä»ã®CERTã§è¨¼ææ¸ããµã¤ã³ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>resource <function>openssl_csr_sign</function></funcdef> + <paramdef>mixed <parameter>csr</parameter></paramdef> + <paramdef>mixed <parameter>x509</parameter></paramdef> + <paramdef>mixed <parameter>priv_key</parameter></paramdef> + <paramdef>long <parameter>days</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-csr-new"> + <refnamediv> + <refname>openssl_csr_new</refname> + <refpurpose>ç§å¯ãã¼ã¨CSRãçæãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_csr_new</function></funcdef> + <paramdef>array <parameter>dn</parameter></paramdef> + <paramdef>resource <parameter>privkey</parameter></paramdef> + <paramdef>array + <parameter><optional>extraattribs</optional></parameter> + </paramdef> + <paramdef>array + <parameter><optional>configargs</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-pkey-new"> + <refnamediv> + <refname>openssl_pkey_new</refname> + <refpurpose>æ°è¦ã«ç§å¯ãã¼ãçæãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>resource <function>openssl_pkey_new</function></funcdef> + <paramdef>array + <parameter><optional>configargs</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-pkey-export-to-file"> + <refnamediv> + <refname>openssl_pkey_export_to_file</refname> + <refpurpose> + ãã¼ã®ã¨ãã¹ãã¼ãå¯è½ãªè¡¨ç¾ããã¡ã¤ã«ã«åå¾ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_pkey_export_to_file</function></funcdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>string <parameter>outfilename</parameter></paramdef> + <paramdef>string + <parameter><optional>passphrase</optional></parameter> + </paramdef> + <paramdef>array + <parameter><optional>config_args</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-pkey-export"> + <refnamediv> + <refname>openssl_pkey_export</refname> + <refpurpose> + ãããã¼ã®ã¨ã¯ã¹ãã¼ãå¯è½ãªè¡¨ç¾ãæååã¾ãã¯ãã¡ã¤ã«ã«åå¾ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_pkey_export</function></funcdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>mixed <parameter>out</parameter></paramdef> + <paramdef>string + <parameter><optional>passphrase</optional></parameter> + </paramdef> + <paramdef>array + <parameter><optional>config_args</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-private-encrypt"> + <refnamediv> + <refname>openssl_private_encrypt</refname> + <refpurpose>ç§å¯ãã¼ã§ãã¼ã¿ãæå·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_private_encrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-private-decrypt"> + <refnamediv> + <refname>openssl_private_decrypt</refname> + <refpurpose>ç§å¯ãã¼ã§ãã¼ã¿ã復å·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_private_decrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-public-encrypt"> + <refnamediv> + <refname>openssl_public_encrypt</refname> + <refpurpose>å ¬éãã¼ã§ãã¼ã¿ãæå·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_public_encrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>mixed <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id="function.openssl-public-decrypt"> + <refnamediv> + <refname>openssl_public_decrypt</refname> + <refpurpose>å ¬éãã¼ã§ãã¼ã¿ã復å·åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>openssl_public_decrypt</function></funcdef> + <paramdef>string <parameter>data</parameter></paramdef> + <paramdef>string <parameter>crypted</parameter></paramdef> + <paramdef>resource <parameter>key</parameter></paramdef> + <paramdef>int + <parameter><optional>padding</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + </reference> <!-- Keep this comment at the end of the file Index: phpdoc/ja/functions/oracle.xml diff -u phpdoc/ja/functions/oracle.xml:1.9 phpdoc/ja/functions/oracle.xml:1.10 --- phpdoc/ja/functions/oracle.xml:1.9 Wed Dec 12 15:53:27 2001 +++ phpdoc/ja/functions/oracle.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.oracle"> <title>Oracle 颿°</title> <titleabbrev>Oracle</titleabbrev> @@ -46,15 +47,17 @@ åºåå¤ãä»£å ¥ããã¾ãã <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php ora_parse($curs, "declare tmp INTEGER; begin tmp := :in; :out := tmp; :x := 7.77; end;"); ora_bind($curs, "result", ":x", $len, 2); ora_bind($curs, "input", ":in", 5, 1); ora_bind($curs, "output", ":out", 5, 2); $input = 765; ora_exec($curs); -echo "Result: $result<BR>Out: $output<BR>In: $input"; +echo "Result: $result<BR>Out: $output<BR>In: $input"; ?> +]]> </programlisting> </informalexample> </para> @@ -302,7 +305,8 @@ UNIXçã®Oracleä¸ã§ã¯ã以ä¸ã®ããã«ã¨ã©ã¼ã¡ãã»ã¼ã¸ã«é¢ãã詳細ãå¾ãã㨠ãã§ãã¾ãã <computeroutput> - <prompt>$</prompt> <userinput>oerr ora <replaceable>00001</replaceable></userinput> 00001, 00000, +<prompt>$</prompt> <userinput>oerr ora +<replaceable>00001</replaceable></userinput> 00001, 00000, "unique constraint (%s.%s) violated" // *Cause: An update or insert statement attempted to insert a duplicate key // For Trusted ORACLE configured in DBMS MAC mode, you may see // this message @@ -415,12 +419,14 @@ <example> <title>Oracleã¬ã³ã¼ããé åã«åå¾ãã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php array($results); -ora_fetch_into($cursor, &$results); +ora_fetch_into($cursor, &$results); echo $results[0]; echo $results[1]; ?> +]]> </programlisting> </example> é åããªãã¡ã¬ã³ã¹ã§åå¾ããå¿ è¦ããããã¨ã«æ³¨æãã¦ä¸ããã @@ -511,7 +517,9 @@ <productname>SQL*Net</productname> ãç¨ãã¦ä½æããã¾ãã <informalexample> <programlisting role="php"> +<![CDATA[ $conn = Ora_Logon("user<emphasis>@TNSNAME</emphasis>", "pass"); +]]> </programlisting> </informalexample> </para> @@ -643,7 +651,7 @@ é¢é£ä»ãã¾ãã </para> <para> - æåæã«0ãã¨ã©ã¼ã®å ´åã¯-1ãè¿ãã¾ãã + &return.success; </para> <simpara> <function>ora_exec</function>, <function>ora_fetch</function>, Index: phpdoc/ja/functions/outcontrol.xml diff -u phpdoc/ja/functions/outcontrol.xml:1.11 phpdoc/ja/functions/outcontrol.xml:1.12 --- phpdoc/ja/functions/outcontrol.xml:1.11 Wed Dec 12 15:53:28 2001 +++ phpdoc/ja/functions/outcontrol.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.12 $ --> <reference id="ref.outcontrol"> <title>åºåå¶å¾¡é¢æ°</title> <titleabbrev>åºåå¶å¾¡</titleabbrev> @@ -17,7 +18,8 @@ <example> <title><function>åºå颿°</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php ob_start(); echo "Hello\n"; @@ -26,7 +28,8 @@ ob_end_flush(); -?> +?> +]]> </programlisting> </example> </para> @@ -78,6 +81,12 @@ ãã¡ãªã³ã°ãããæãå¤å´ã®ãã¼ãã«ã® </table> ã¿ã°ãç¾ãã ã¾ã§ãã¼ãã«ã¯æç»ããã¾ããã </para> + <para> + ããã¤ãã®ãã¼ã¸ã§ã³ã®Microsoft Internet Explorerã¯ã256ãã¤ãã® + åºåãåãã¦ãããã¼ã¸ã表示ãå§ãã¾ãããã®ããããããã®ãã©ã¦ + ã¶ã«ãã¼ã¸ã表示ãããã«ã¯ããã©ãã·ã¥ããåã«ä½åãªç©ºç½ãéä¿¡ã + ãå¿ è¦ãããããããã¾ããã + </para> </note> </refsect1> </refentry> @@ -142,7 +151,8 @@ <example> <title>ã¦ã¼ã¶å®ç¾©ã®ã³ã¼ã«ããã¯é¢æ°ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php function callback($buffer) { @@ -153,30 +163,33 @@ ob_start("callback"); -?> +?> -<html> -<body> -<p>It's like comparing apples to oranges. -</body> -</html> +<html> +<body> +<p>It's like comparing apples to oranges. +</body> +</html> -<?php +<?php ob_end_flush(); -?> +?> +]]> </programlisting> </example> <para> åºåã¯æ¬¡ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -<html> -<body> -<p>It's like comparing oranges to oranges. -</body> -</html> +<![CDATA[ +<html> +<body> +<p>It's like comparing oranges to oranges. +</body> +</html> +]]> </programlisting> </informalexample> </para> @@ -242,6 +255,31 @@ </refsect1> </refentry> + <refentry id="function.ob-get-level"> + <refnamediv> + <refname>ob_get_level</refname> + <refpurpose> + åºåãããã¡ãªã³ã°æ©æ§ã®ãã¹ãã¬ãã«ãè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>ob_get_level</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + ãã®é¢æ°ã¯ãåºåãããã¡ãªã³ã°æ©æ§ã®ãã¹ãã¬ãã«ãè¿ãã¾ãã + </para> + <para> + <function>ob_start</function>ããã³ + <function>ob_get_contents</function>ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + <refentry id="function.ob-gzhandler"> <refnamediv> <refname>ob_gzhandler</refname> @@ -255,8 +293,16 @@ <funcprototype> <funcdef>string <function>ob_gzhandler</function></funcdef> <paramdef>string <parameter>buffer</parameter></paramdef> + <paramdef>int + <parameter><optional>mode</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> + <note> + <para> + <parameter>mode</parameter>ã¯ãPHP 4.0.5ã§è¿½å ããã¾ããã + </para> + </note> <para> <function>ob_gzhandler</function> ã¯ãWebãã¼ã¸ã®å§ç¸®ããµãã¼ãã ãgzã¨ã³ã³ã¼ãããããã¼ã¿ãWebãã©ã¦ã¶ã«éä¿¡ãããã¨ã容æã«ãã @@ -272,22 +318,89 @@ <example> <title><function>ob_gzhandler</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php ob_start("ob_gzhandler"); ?> -<html> -<body> -<p>This should be a compressed page. -</html> -</body> +<html> +<body> +<p>This should be a compressed page. +</html> +<body> +]]> </programlisting> </example> </para> <para> <function>ob_start</function> ããã³ <function>ob_end_flush</function>ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + + <refentry id="function.ob-flush"> + <refnamediv> + <refname>ob_flush</refname> + <refpurpose> + åºåãããã¡ããã©ãã·ã¥(éä¿¡)ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ob_flush</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + ãã®é¢æ°ã¯ã(ããå ´åã«)åºåãããã¡ã®å 容ãéä¿¡ãã¾ããæ´ã«ãã + ãã¡ã®å 容ãå¦çãããå ´åã«ã¯ã<function>ob_flush</function>ãã³ã¼ + ã«ãããå¾ã«ãããã¡ã®å 容ãç ´æ£ãããã®ã§ã + <function>ob_flush</function>ã®åã« + <function>ob_get_contents</function>ãã³ã¼ã«ããå¿ è¦ãããã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ã<function>ob_end_flush</function>ã®ããã«åºåãããã¡ + ãç ´æ£ãã¾ããã + </para> + <para> + <function>ob_get_contents</function>, + <function>ob_clean</function>, + <function>ob_end_flush</function>, + <function>ob_end_clean</function>ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + + <refentry id="function.ob-clean"> + <refnamediv> + <refname>ob_clean</refname> + <refpurpose> + åºåãããã¡ãã¯ãªã¢(æ¶å»)ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ob_clean</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + ãã®é¢æ°ã¯ãåºåãããã¡ã®å 容ãç ´æ£ãã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ã<function>ob_end_clean</function>ã®ããã«åºåãããã¡ + ãç ´æ£ãã¾ããã + </para> + <para> + <function>ob_flush</function>, + <function>ob_end_flush</function>, + <function>ob_end_clean</function>ãåç §ä¸ããã </para> </refsect1> </refentry> Index: phpdoc/ja/functions/pcntl.xml diff -u phpdoc/ja/functions/pcntl.xml:1.3 phpdoc/ja/functions/pcntl.xml:1.4 --- phpdoc/ja/functions/pcntl.xml:1.3 Wed Dec 12 15:53:29 2001 +++ phpdoc/ja/functions/pcntl.xml Sat Jan 26 10:38:34 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <reference id="ref.pcntl"> <title>ããã»ã¹å¶å¾¡é¢æ°</title> <titleabbrev>PCNTL</titleabbrev> @@ -113,7 +113,8 @@ <example> <title>ããã»ã¹å¶å¾¡ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $pid = pcntl_fork(); if ($pid == -1) { @@ -159,6 +160,7 @@ ?> +]]> </programlisting> </example> </sect1> @@ -192,7 +194,8 @@ <example> <title><function>pcntl_fork</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $pid = pcntl_fork(); if ($pid == -1) { @@ -203,7 +206,8 @@ // åããã»ã¹ã®å ´å } -?> +?> +]]> </programlisting> </example> <para> @@ -242,7 +246,8 @@ <example> <title><function>pcntl_signal</function> Example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php // signal handler function function sig_handler($signo) { @@ -279,12 +284,13 @@ print "Done\n" -?> +?> +]]> </programlisting> </example> <para> - See also <function>pcntl_fork</function> and - <function>pcntl_waitpid</function>. + <function>pcntl_fork</function>ããã³ + <function>pcntl_waitpid</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -306,54 +312,52 @@ </funcprototype> </funcsynopsis> <para> - The <function>pcntl_waitpid</function> function suspends execution - of the current process until a child as specified by the - <parameter>pid</parameter> argument has exited, or until a signal - is delivered whose action is to terminate the current process or - to call a signal handling function. If a child as requested by - <parameter>pid</parameter> has already exited by the time of the - call (a so-called "zombie" process), the function returns - immediately. Any system resources used by the child are - freed. Please see your system's waitpid(2) man page for specific - details as to how waitpid works on your system. - </para> - <para> - <function>pcntl_waitpid</function> returns the process ID of the - child which exited, -1 on error or zero if WNOHANG was used and no - child was available + <function>pcntl_waitpid</function>颿°ã¯ã + 弿°<parameter>pid</parameter>ã§æå®ããåããã»ã¹ãçµäºãããã + ã«ã¬ã³ãã®ããã»ã¹ãçµäºãããã·ã°ãã«å¦ç颿°ãã³ã¼ã«ããã·ã°ã + ã«ãéä¿¡ãããã¾ã§ã«ã¬ã³ãã®ããã»ã¹ã®å®è¡ã䏿ãã¾ãã + <parameter>pid</parameter>ã§ãªã¯ã¨ã¹ããããåããã»ã¹ãã ã³ã¼ã« + æã«æ¢ã«çµäºãã¦ããå ´å("ã¾ã³ã"ããã»ã¹ã¨å¼ã°ãã¾ã)ããã®é¢æ° + ã¯ç´ã¡ã«å¦çãè¿ãã¾ããåããã»ã¹ã«ãã使ç¨ãããå ¨ã¦ã®ã·ã¹ãã + ãªã½ã¼ã¹ã¯ãè§£æ¾ããã¾ããwaitpidãã·ã¹ãã ã§ã®åä½ã«é¢ãã詳細㫠+ ã¤ãã¦ã¯ãã·ã¹ãã ã®waitpid(2)ããã¥ã¢ã«ãã¼ã¸ãåç §ä¸ããã + </para> + <para> + <function>pcntl_waitpid</function>ã¯ãçµäºããåããã»ã¹ã®ããã» + ã¹IDãè¿ãã¾ããã¨ã©ã¼ã®å ´åã¯-1ãWNOHANGã使ç¨ãããåããã»ã¹ã + å©ç¨ã§ããªãå ´åã«0ãè¿ãã¾ãã </para> <para> - The value of <parameter>pid</parameter> can be one of the following: + <parameter>pid</parameter>ã®å¤ã¯æ¬¡ã®ã©ããã¨ãªãã¾ãã <table> - <title>possible values for <parameter>pid</parameter></title> + <title><parameter>pid</parameter>ã®å¤</title> <tgroup cols="2"> <tbody> <row> <entry><literal>< -1</literal></entry> <entry> - wait for any child process whose process group ID is equal to - the absolute value of <parameter>pid</parameter>. + <parameter>pid</parameter>ã®çµ¶å¯¾å¤ã«çããããã»ã¹ã°ã«ã¼ãID + ãçããåããã»ã¹ãå¾ ã¡ã¾ãã </entry> </row> <row> <entry><literal>-1</literal></entry> <entry> - wait for any child process; this is the same behaviour that - the wait function exhibits. + å ¨ã¦ã®åããã»ã¹ãå¾ ã¤ãããã¯ãwait颿°ã®åä½ã¨åãã§ãã </entry> </row> <row> <entry><literal>0</literal></entry> <entry> - wait for any child process whose process group ID is equal to - that of the calling process. + ããã»ã¹ã°ã«ã¼ãIDãã³ã¼ã«å´ã®ããã»ã¹ã¨çããåããã»ã¹ãå¾ + ã¡ã¾ãã </entry> </row> <row> <entry><literal>> 0</literal></entry> <entry> - wait for the child whose process ID is equal to the value of - <parameter>pid</parameter>. + ããã»ã¹IDã<parameter>pid</parameter>ã®å¤ã«çããåããã»ã¹ + ãå¾ ã¡ã¾ãã </entry> </row> </tbody> @@ -361,9 +365,9 @@ </table> </para> <para> - <function>pcntl_waitpid</function> will store status information - in the <parameter>status</parameter> parameter which can be - evaluated using the following functions: + <function>pcntl_waitpid</function>ã¯ããã©ã¡ã¼ã¿ + <parameter>status</parameter>ã®ä¸ã«ã¹ãã¼ã¿ã¹æ å ±ãä¿åãã¾ããã + ã®ã¹ãã¼ã¿ã¹ã¯ã次ã®é¢æ°ãç¨ãã¦è©ä¾¡å¯è½ã§ãã <function>pcntl_wifexited</function>, <function>pcntl_wifstopped</function>, <function>pcntl_wifsignaled</function>, @@ -372,24 +376,23 @@ <function>pcntl_wstopsig</function>. </para> <para> - The value of <parameter>options</parameter> is the value of zero - or more of the following two global constants - <literal>OR</literal>'ed together: + <parameter>options</parameter>ã®å¤ã¯ã次ã®2ã¤ã®ã°ãã¼ãã«å®æ°ã®ã¼ + ãã¾ãã¯ãã以ä¸ã®è«çåã§ãã <table> - <title>possible values for <parameter>options</parameter></title> + <title><parameter>options</parameter>ã®å¤</title> <tgroup cols="2"> <tbody> <row> <entry><literal>WNOHANG</literal></entry> <entry> - return immediately if no child has exited. + åããã»ã¹ãçµäºãã¦ããªãå ´åã«ç´ã¡ã«å¦çãè¿ãã¾ãã </entry> </row> <row> <entry><literal>WUNTRACED</literal></entry> <entry> - return for children which are stopped, and whose status has - not been reported. + 忢ããåããã»ã¹ã®å ´åã«å¦çãè¿ãã¾ããããã¦ãã¹ãã¼ã¿ã¹ + ã¯ãªãã¼ãããã¾ããã </entry> </row> </tbody> @@ -397,14 +400,14 @@ </table> </para> <para> - See also <function>pcntl_fork</function>, + <function>pcntl_fork</function>, <function>pcntl_signal</function>, <function>pcntl_wifexited</function>, <function>pcntl_wifstopped</function>, <function>pcntl_wifsignaled</function>, <function>pcntl_wexitstatus</function>, - <function>pcntl_wtermsig</function> and - <function>pcntl_wstopsig</function>. + <function>pcntl_wtermsig</function>, + <function>pcntl_wstopsig</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -425,18 +428,18 @@ </funcprototype> </funcsynopsis> <para> - Returns the return code of a terminated child. This function is - only useful if <function>pcntl_wifexited</function> returned - &true;. + çµäºããåããã»ã¹ã®ãªã¿ã¼ã³ã³ã¼ããè¿ãã¾ãããã®é¢æ°ã¯ã + <function>pcntl_wifexited</function>ã&true;ãè¿ãå ´åã®ã¿æç¨ã§ + ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wifexited</function>. + <function>pcntl_waitpid</function>ããã³ + <function>pcntl_wifexited</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -457,17 +460,17 @@ </funcprototype> </funcsynopsis> <para> - Returns &true; if the child status code represents a successful - exit. + åããã»ã¹ã®ã¹ãã¼ã¿ã¹ã³ã¼ããçµäºã«æåããå ´åã«&true;ãè¿ãã¾ + ãã </para> - <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + <para> + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wexitstatus</function>. + <function>pcntl_waitpid</function>ããã³ + <function>pcntl_wexitstatus</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -488,17 +491,17 @@ </funcprototype> </funcsynopsis> <para> - Returns &true; if the child process exited because of a signal - which was not caught. + ææãããªãã£ãã·ã°ãã«ã®ããã§åããã»ã¹ãçµäºããå ´åã«&true; + ãè¿ãã¾ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_signal</function>. + <function>pcntl_waitpid</function>ããã³ + <function>pcntl_signal</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -519,23 +522,22 @@ </funcprototype> </funcsynopsis> <para> - Returns &true; if the child process which caused the return is - currently stopped; this is only possible if the call to - <function>pcntl_waitpid</function> was done using the option - <literal>WUNTRACED</literal>. + ãªã¿ã¼ã³ãçããåããã»ã¹ãç¾å¨åæ¢ãã¦ããå ´åã«&true;ãè¿ãã¾ + ãããã®é¢æ°ã¯ã<function>pcntl_waitpid</function>ã®ã³ã¼ã«ããªã + ã·ã§ã³<literal>WUNTRACED</literal>ãç¨ãã¦ããå ´åã®ã¿ä½¿ç¨å¯è½ã§ + ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function>. + <function>pcntl_waitpid</function>ãåç §ä¸ããã </para> </refsect1> </refentry> - <refentry id="function.pcntl-wstopsig"> <refnamediv> <refname>pcntl_wstopsig</refname> @@ -552,18 +554,18 @@ </funcprototype> </funcsynopsis> <para> - Returns the number of the signal which caused the child to stop. - This function is only useful if - <function>pcntl_wifstopped</function> returned &true;. + åããã»ã¹ã忢ãããã·ã°ãã«çªå·ãè¿ãã¾ãããã®é¢æ°ã¯ã + <function>pcntl_wifstopped</function>ã&true;ãè¿ãå ´åã®ã¿æç¨ã§ + ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wifstopped</function>. + <function>pcntl_waitpid</function>ã + <function>pcntl_wifstopped</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -584,23 +586,46 @@ </funcprototype> </funcsynopsis> <para> - Returns the number of the signal that caused the child process to - terminate. This function is only useful if - <function>pcntl_wifsignaled</function> returned &true;. + åããã»ã¹ãçµäºãããã·ã°ãã«ã®æ°ãè¿ãã¾ãããã®é¢æ°ã¯ã + <function>pcntl_wifsignaled</function>ã&true;ãè¿ãå ´åã®ã¿æç¨ + ã§ãã </para> <para> - The parameter <parameter>status</parameter> is the status - parameter supplied to a successfull call to - <function>pcntl_waitpid</function>. + ãã©ã¡ã¼ã¿<parameter>status</parameter>ã¯ã + <function>pcntl_waitpid</function>ã®ã³ã¼ã«æã«æå®ãããã¹ãã¼ã¿ + ã¹ãã©ã¡ã¼ã¿ã§ãã </para> <para> - See also <function>pcntl_waitpid</function>, - <function>pcntl_signal</function> and - <function>pcntl_wifsignaled</function>. + <function>pcntl_waitpid</function>, + <function>pcntl_signal</function>, + <function>pcntl_wifsignaled</function>ãåç §ä¸ããã </para> </refsect1> </refentry> + <refentry id='function.pcntl-exec'> + <refnamediv> + <refname>pcntl_exec</refname> + <refpurpose> + ã«ã¬ã³ãã®ããã»ã¹ç©ºéã§æå®ããããã°ã©ã ãå®è¡ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool <function>pcntl_exec</function></funcdef> + <paramdef>string <parameter>path</parameter></paramdef> + <paramdef>array <parameter><optional>args</optional></parameter></paramdef> + <paramdef>array <parameter><optional>envs</optional></parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + </reference> <!-- Keep this comment at the end of the file Index: phpdoc/ja/functions/pcre.xml diff -u phpdoc/ja/functions/pcre.xml:1.30 phpdoc/ja/functions/pcre.xml:1.31 --- phpdoc/ja/functions/pcre.xml:1.30 Sun Jan 20 12:54:12 2002 +++ phpdoc/ja/functions/pcre.xml Sat Jan 26 10:38:34 2002 @@ -1,9 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.31 $ --> <reference id="ref.pcre"> <title>Perläºæã®æ£è¦è¡¨ç¾é¢æ°</title> <titleabbrev>PCRE</titleabbrev> <partintro> + <note> + <para> + PHPã¯ã<link linkend="ref.regex">POSIXæ¡å¼µæ£è¦è¡¨ç¾é¢æ°</link>ãç¨ + ãã¦POSIXæ¡å¼µæ§æãç¨ããæ£è¦è¡¨ç¾ããµãã¼ããã¦ãã¾ãã + </para> + </note> <para> ãã®é¢æ°ã§ä½¿ç¨ããããã¿ã¼ã³ã«é¢ããæ§æã¯ãPerl ã«é常ã«ãã似㦠ãã¾ããå¼ã¯ãããªãã¿ãä¾ãã°ã¹ã©ãã·ã¥ (/) ã§å²ã¾ããå¿ è¦ããã @@ -56,6 +63,12 @@ <simpara> Perläºæã®æ£è¦è¡¨ç¾é¢æ°ã¯ãPHP 4ããã³PHP 3.0.9以éã§å©ç¨å¯è½ã§ãã </simpara> + <simpara> + æ£è¦è¡¨ç¾ã¯ãPhilip Hazelã§æ¸ãããthe University of Cambridge, + Englandã«è使¨©ããããªã¼ãã³ã½ã¼ã¹ã½ããã¦ã¨ã¢ã®PCREã©ã¤ãã©ãªãã + ã±ã¼ã¸ã§ãµãã¼ãããã¾ãã<ulink + url="&url.pcre;">&url.pcre;</ulink>ã§å©ç¨å¯è½ã§ãã + </simpara> </note> </partintro> @@ -97,17 +110,20 @@ <example> <title>æåå"php"ãæ¢ã</title> <programlisting role="php"> +<![CDATA[ // ãã©ã¡ã¼ã¿ã®ããªãã¿ã®å¾ã®"i"ã¯å¤§æåå°æåãåºå¥ããªãæ¤ç´¢ã示ãã¾ã if (preg_match ("/php/i", "PHP is the web scripting language of choice.")) { print "A match was found."; } else { print "A match was not found."; } +]]> </programlisting> </example> <example> <title>åèª"web"ãæ¢ã</title> <programlisting role="php"> +<![CDATA[ // ãã¿ã¼ã³å ã®\bã¯åèªã®å¢çã示ãã¾ãããã®ãããç¬ç«ããåèªã® // "web"ã«ã®ã¿ããããã"webbing" ã¾ã㯠"cobweb"ã®ãããªåèªã®ä¸ // é¨ã«ã¯ããããã¾ãã @@ -121,11 +137,13 @@ } else { print "ããããããã®ã¯ã¿ã¤ããã¾ããã§ããã"; } +]]> </programlisting> </example> <example> <title>URLãããã¡ã¤ã³åãå¾ã</title> <programlisting role="php"> +<![CDATA[ // URLãããã¹ãåãå¾ã preg_match("/^(http:\/\/)?([^\/]+)/i", "http://www.php.net/index.html", $matches); @@ -133,11 +151,14 @@ // ãã¹ãåã®æå¾ã®äºã¤ãå¾ã preg_match("/[^\.\/]+\.[^\.\/]+$/",$host,$matches); echo "ãã¡ã¤ã³å: ".$matches[0]."\n"; +]]> </programlisting> </example> ãã®ä¾ã®åºåã¯ä»¥ä¸ã¨ãªãã¾ãã <programlisting> +<![CDATA[ domain name is: php.net +]]> </programlisting> <function>preg_match_all</function>, <function>preg_replace</function>, @@ -188,18 +209,22 @@ æååã®é åã§ãããã¨ãã£ãé çªã¨ãªãã¾ãã <informalexample> <programlisting role="php"> -preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", - "<b>example: </b><div align=left>this a test</div>", +<![CDATA[ +preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", + "<b>example: </b><div align=left>this a test</div>", $out, PREG_PATTERN_ORDER); print $out[0][0].", ".$out[0][1]."\n"; -print $out[1][0].", ".$out[1][1]."\n" +print $out[1][0].", ".$out[1][1]."\n"; +]]> </programlisting> </informalexample> ãã®ä¾ã®åºåã¯ä»¥ä¸ã®ããã«ãªãã¾ãã <informalexample> <programlisting> -<b>example: </b>, <div align=left>this is a test</div> +<![CDATA[ +<b>example: </b>, <div align=left>this is a test</div> example: , this is a test +]]> </programlisting> </informalexample> $out[0]ã¯ããã¿ã¼ã³å ¨ä½ã«ãããããæååã®é åãæãã¦ããã @@ -216,18 +241,22 @@ ã¨ãã£ãé åºã¨ãªãã¾ãã <informalexample> <programlisting role="php"> -preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", - "<b>example: </b><div align=left>this a test</div>", +<![CDATA[ +preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", + "<b>example: </b><div align=left>this a test</div>", $out, PREG_SET_ORDER); print $out[0][0].", ".$out[0][1]."\n"; -print $out[1][0].", ".$out[1][1]."\n" +print $out[1][0].", ".$out[1][1]."\n"; +]]> </programlisting> </informalexample> ãã®ä¾ã®åºåã¯ä»¥ä¸ã®ããã«ãªãã¾ãã <informalexample> <programlisting role="php"> -<b>example: </b>, example: -<div align=left>this is a test</div>, this is a test +<![CDATA[ +<b>example: </b>, example: +<div align=left>this is a test</div>, this is a test +]]> </programlisting> </informalexample> ãã®å ´åã$matches[0] ã¯æåã«ãããããçµã§ããã @@ -253,8 +282,10 @@ <example> <title>ããã¹ãããå ¨ã¦ã®é»è©±çªå·ãå¾ã</title> <programlisting role="php"> +<![CDATA[ preg_match_all ("/\(? (\d{3})? \)? (?(1) [\-\s] ) \d{3}-\d{4}/x", "Call 555-1212 or 1-800-555-1212", $phones); +]]> </programlisting> </example> </para> @@ -262,32 +293,36 @@ <example> <title>HTMLã¿ã°ã«ããããããã®ãè¦ä»ãã(greedy)</title> <programlisting role="php"> +<![CDATA[ // \\2 ã¯å¾æ¹åç §ã®ä¾ã§ããããã¯ãpcre ã«æ£è¦è¡¨ç¾èªä½ã®æ¬å¼§ã®2çªç®ã® // çµãã¤ã¾ããã®å ´åã¯([\w]+)ãã«ããããã¾ããæååãäºéå¼ç¨ç¬¦ã§æ¬ // ããã¦ãããããããã¯ã¹ã©ãã·ã¥ã®è¿½å ãå¿ è¦ã§ãã -$html = "<b>bold text</b><a href=howdy.html>click me</a>"; +$html = "<b>bold text</b><a href=howdy.html>click me</a>"; -preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $html, $matches); +preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $html, $matches); -for ($i=0; $i< count($matches[0]); $i++) { - echo "matched: ".$matches[0][$i]."\n"; - echo "part 1: ".$matches[1][$i]."\n"; - echo "part 2: ".$matches[3][$i]."\n"; - echo "part 3: ".$matches[4][$i]."\n\n"; +for ($i=0; $i< count($matches[0]); $i++) { + echo "matched: ".$matches[0][$i]."\n"; + echo "part 1: ".$matches[1][$i]."\n"; + echo "part 2: ".$matches[3][$i]."\n"; + echo "part 3: ".$matches[4][$i]."\n\n"; } +]]> </programlisting> </example> ãã®ä¾ã®åºåã¯ä»¥ä¸ã¨ãªãã¾ãã <programlisting> -matched: <b>bold text</b> -part 1: <b> +<![CDATA[ +matched: <b>bold text</b> +part 1: <b> part 2: bold text -part 3: </b> +part 3: </b> -matched: <a href=howdy.html>click me</a> -part 1: <a href=howdy.html> +matched: <a href=howdy.html>click me</a> +part 1: <a href=howdy.html> part 2: click me -part 3: </a> +part 3: </a> +]]> </programlisting> </para> <simpara> @@ -381,22 +416,28 @@ <example> <title>è¤æ°ã®å¤ãç½®æãã</title> <programlisting role="php"> +<![CDATA[ $patterns = array ("/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/", "/^\s*{(\w+)}\s*=/"); $replace = array ("\\3/\\4/\\1\\2", "$\\1 ="); print preg_replace ($patterns, $replace, "{startDate} = 1999-5-27"); +]]> </programlisting> </example> ãã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã <programlisting> - $startDate = 5/27/1999 +<![CDATA[ +$startDate = 5/27/1999 +]]> </programlisting> <example> <title>/e 修飾åã®ä½¿ç¨æ³</title> <programlisting role="php"> -preg_replace ("/(<\/?)(\w+)([^>]*>)/e", +<![CDATA[ +preg_replace ("/(<\/?)(\w+)([^>]*>)/e", "'\\1'.strtoupper('\\2').'\\3'", $html_body); +]]> </programlisting> <para> å ¥åããã¹ãã®å ¨ã¦ã®HTMLã¿ã°ã大æåã«å¤æãã¾ãã @@ -405,33 +446,34 @@ <example> <title>HTMLãããã¹ãã«å¤æãã</title> <programlisting role="php"> +<![CDATA[ // $document ã«ã¯ãHTMLããã¥ã¡ã³ããå«ã¾ãã¦ããå¿ è¦ãããã¾ãã // ãã®ããã¥ã¡ã³ãã®HTMLã¿ã°ããã³javascriptã®é¨åã¨ç©ºç½æåã // åé¤ãã¾ããã¾ããããã¤ãã®HTMLã¨ã³ãã£ãã£ãç価ãªããã¹ãã« // 夿ãã¾ãã -$search = array ("'<script[^>]*?>.*?</script>'si", +$search = array ("'<script[^>]*?>.*?</script>'si", // javascriptãåé¤ - "'<[\/\!]*?[^<>]*?>'si", // htmlã¿ã°ãåé¤ + "'<[\/\!]*?[^<>]*?>'si", // htmlã¿ã°ãåé¤ "'([\r\n])[\s]+'", // ç©ºç½æåãåé¤ - "'&(quot|#34);'i", // htmlã¨ã³ãã£ãã£ãç½®æ - "'&(amp|#38);'i", - "'&(lt|#60);'i", - "'&(gt|#62);'i", - "'&(nbsp|#160);'i", - "'&(iexcl|#161);'i", - "'&(cent|#162);'i", - "'&(pound|#163);'i", - "'&(copy|#169);'i", - "'&#(\d+);'e"); // phpã¨ãã¦è©ä¾¡ + "'&(quot|#34);'i", // htmlã¨ã³ãã£ãã£ãç½®æ + "'&(amp|#38);'i", + "'&(lt|#60);'i", + "'&(gt|#62);'i", + "'&(nbsp|#160);'i", + "'&(iexcl|#161);'i", + "'&(cent|#162);'i", + "'&(pound|#163);'i", + "'&(copy|#169);'i", + "'&#(\d+);'e"); // phpã¨ãã¦è©ä¾¡ $replace = array ("", "", "\\1", "\"", - "&", - "<", - ">", + "&", + "<", + ">", " ", chr(161), chr(162), @@ -440,6 +482,7 @@ "chr(\\1)"); $text = preg_replace ($search, $replace, $document); +]]> </programlisting> </example> </para> @@ -562,21 +605,28 @@ æ¤ç´¢æååã®é¨åãåå¾ãã¾ãã </para> <programlisting role="php"> +<![CDATA[ // " ", \r, \t, \n , \f ãå«ãã«ã³ãã¾ãã¯ç©ºç½æåã§å¥ãåå²ãã¾ãã $keywords = preg_split ("/[\s,]+/", "hypertext language, programming"); +]]> </programlisting> <para> æååãæåè¦ç´ ã«åå²ãã¾ãã </para> <programlisting role="php"> +<![CDATA[ $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); +]]> </programlisting> </example> <para> + <function>spliti</function>, + <function>split</function>, + <function>implode</function>, <function>preg_match</function>, - <function>preg_match_all</function>, + <function>preg_match_all</function>, <function>preg_replace</function>ãåç §ä¸ããã </para> </refsect1> @@ -622,23 +672,26 @@ <example> <title><function>preg_quote</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $keywords="$40 for a g3/400"; $keywords = preg_quote ($keywords, "/"); echo $keywords; // \$40 for a g3\/400 ãè¿ãã¾ãã +]]> </programlisting> </example> <example> <title>ããã¹ãã®ä¸ã®åèªãç½®æãã</title> <programlisting role="php"> - +<![CDATA[ // ãã®ä¾ã§ã¯ãpreg_quote($word) ãæ£è¦è¡¨ç¾ã®ç¹æ®æåã§ããã¢ã¹ã¿ãªã¹ // ã¯ãä¿æããããã«ä½¿ç¨ããã¦ãã¾ãã $textbody = "This book is *very* hard to find."; $word = "*very*"; $textbody = preg_replace ("/".preg_quote($word)."/", - "<i>".$word."</i>", + "<i>".$word."</i>", $textbody); +]]> </programlisting> </example> </para> @@ -673,13 +726,14 @@ ã«ããè¿ãããé åã«<function>array_values</function>ãé©ç¨ãã¦ä¸ ããã </para> - <para> <example> <title><function>preg_grep</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ // æµ®åå°æ°ç¹æ°ãå«ãå ¨ã¦ã®é åè¦ç´ ãè¿ã $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); +]]> </programlisting> </example> </para> @@ -688,7 +742,7 @@ <refentry id="pcre.pattern.modifiers"> <refnamediv> - <refname>Pattern Modifiers</refname> + <refname>ãã¿ã¼ã³ä¿®æ£å</refname> <refpurpose>æ£è¦è¡¨ç¾ãã¿ã¼ã³ã§ä½¿ç¨å¯è½ãªä¿®é£¾åãå¾ã</refpurpose> </refnamediv> <refsect1> @@ -848,7 +902,7 @@ <simpara> ãã®ä¿®æ£åã¯ãPerléäºæãªPCREã®æ©è½ãæå¹ã«ãã¾ãããã¿ã¼ã³ æååã¯ãUTF-8ã¨ã³ã³ã¼ããããæååã¨ãã¦å¦çããã¾ããã - ã®ä¿®æ£åã¯ãPHP-4.0.7以éã§ä½¿ç¨å¯è½ã§ãã + ã®ä¿®æ£åã¯ãPHP-4.1.0以éã§ä½¿ç¨å¯è½ã§ãã </simpara> </listitem> </varlistentry> @@ -875,291 +929,693 @@ <refsect1> <title>Perl ã¨ã®å·®</title> - <literallayout> - ããã§èª¬æããã®ã¯ãPerl 5.005 ã«é¢é£ãããã®ã§ãã - - 1. ããã©ã«ãã§ã¯ç©ºç½æå㯠C ã©ã¤ãã©ãªé¢æ° isspace() ã - èªèããå ¨ã¦ã®æåã§ãããå¥ã®æååãã¼ãã«ãç¨ãã¦PCREã - ã³ã³ãã¤ã«ãããã¨ãå¯è½ã§ãã - é常ãisspace() ã¯ç©ºç½ããã©ã¼ã ãã£ã¼ããæ¹è¡ãè¤æ¹ã - æ°´å¹³ã¿ããåç´ã¿ãã«ããããã¾ãã - Perl 5 ã§ã¯ããç©ºç½æåã®ä¸ã«åç´ã¿ããå«ãã§ãã¾ããã - ããªãåãã Perl ããã¥ã¡ã³ãã«ãã£ã \v ã¨ã¹ã±ã¼ãã¯ã - å®éã¯èªèããã¦ãã¾ããã§ããã - ãããããã®æåèªä½ã¯å°ãªãã¨ã 5.002 ã¾ã§ã¯ç©ºç½æåã¨ã㦠- å¦çããã¦ãã¾?_ã - 5.004 ããã³ 5.005 ã§ã¯ããã®æå㯠\s ã«ããããã¾ããã - - 2. PCRE ã§ã¯ãå èªã¿è¨æ(assertion)æã«ç¹°ãè¿ãæ°ã®æå®ã使ç¨ã§ãã¾ããã - Perl ã¯ããã許å¯ãã¾ãããæå³ããéãã«åä½ãããã¨ã - æå³ããããã§ã¯ããã¾ããã - ä¾ãã°ã(?!a){3} ã¯ã次ã®3æåã "a" ã§ãªããã¨ã - è¨æããããã§ã¯ããã¾ããã - ãã®æå®ã¯ãæ¬¡ã®æåã "a" ã§ã¯ãªããã¨ã3åè¨æããã ãã§ãã - - 3. å¦å®ã®å èªã¿è¨æã®ä¸ã§çãããµããã¿ã¼ã³ãåå¾ããåæ°ã¯è¨ç®ãã - ã¾ããããªãã»ãããã¯ãã«ã®ä¸ã®å¯¾å¿ããã¨ã³ããªã¯è¨å®ããã¾ããã - Perl ã§ã¯ãè¨æã®ãããã³ã°ã«å¤±æããåã«ããããã - ãã¿ã¼ã³ãããã®å¤æ°ãè¨å®ãã¾ããããããè¡ãããã®ã¯ã - å¦å®ã®å èªã¿è¨æã®æã1ã¤ã ãã®å ´åã®ã¿ã§ãã - - 4. ãã«æåæåã¯ãæ¤ç´¢å¯¾è±¡æååã§ãµãã¼ãããã¾ããã - ãã¿ã¼ã³æååã§ã¯ãµãã¼ãããã¾ããã - ããã¯ããã¿ã¼ã³æååã¯ã0 ãçµç«¯ã¨ããé常㮠C æååã¨ã㦠- 渡ãããããã§ãã - ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ "\0" ã¯ããã«æåã表ããã¿ã¼ã³ã¨ã㦠- 使ç¨ãããã¨ãå¯è½ã§ãã - - 5. 次㮠Perl ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã¯ããµãã¼ãããã¾ããã: - \l, \u, \L, \U, \E, \Q - å®éãPerl ã§ã¯ããããã¯ãã¿ã¼ã³ãããã³ã°ã¨ã³ã¸ã³ã®é¨åã§ã¯ãªãã - éå¸¸ã®æååå¦çã®é¨åã«å®è¨¼ããã¦ãã¾ãã - - 6. Perl ã® \G è¨æã¯ãä¸åã®ãã¿ã¼ã³ãããã«é¢ãããã®ã§ã¯ãªãããã - ãµãã¼ãããã¾ããã - - 7. æç¢ºã«è¿°ã¹ãã¨ãPCRE 㯠(?{code}) æ§é ããµãã¼ããã¾ããã - - 8. - Perl 5.005_02 ã§ã¯ãæ¸ããã¿æã« - ãã¿ã¼ã³ã®ä¸é¨ãç¹°ãè¿ãéã«å?ããæååã®è¨å®ã«é¢é£ãã - å¥å¦ãªåä½ãè¦ããããã¾ãã - ä¾ãã°ã"aba" ããã¿ã¼ã³ /^(a(b)?)+$/ ã«ãããã³ã°ããå ´åã - $2 ã«ã¯ãå¤ "b" ãè¨å®ããã¾ããã"aabbaa" ã /^(aa(bb)?)+$/ - ã«ããããããå ´åã$2 ã¯è¨å®ããã¾ããã - ãããããã¿ã¼ã³ã/^(aa(b(b))?)+$/ã«å¤ããã¨ã$2 (ããã³ $3) - ãè¨å®ããã¾ãã - - Perl 5.004 ã§ã¯ã$2 ã¯ã©ã¡ã?±ã¼ã¹ã§ãè¨å®ããã¾ãã - ããã¯ãPCRE ã§ãå¦Çã§ããå°¦?çã« Perl ãå¥ã®çç¾ã®ãªã - ç¶æ ã«å¤æ´ãããå ´åãPCRE ã追å¾ããå¯è½æ§ãããã¾ãã - - 9. ä»ã®æªè§£æ±ºã®çç¾ã¯ãPerl 5.005_02 ã§ã¯ããã¿ã¼ã³ - /^(a)?(?(1)a|b)+$/ ã¯æåå "a" ã«ããããã¾ããã - PCRE ã§ã¯ãããããªãã¨ãããã¨ã§ãã - ããããPerl 㨠PCRE ã¯å ±ã« /^(a)?a/ ã§ "a" ãããããã - å ´åã« $1 ãæªå®ç¾©ã®ã¾ã¾ã¨ãªãã¾ãã - - 10. PCRE ã¯ãPerl æ£è¦è¡¨ç¾ã®æ©è½ã«ããã¤ãã®æ¡å¼µæ©è½ãæä¾ãã¾ãã - - (a) å èªã¿è¨æã¯ãåºå®é·ã®æååã«ãããããå¿ è¦ãããã¾ããã - å èªã¿è¨æã®å¥ã®åæã¯ãç°ãªã£ãé·ãã®æååã«ããããããã¨ã - ã§ãã¾ããPerl 5.005 ã§ã¯å ¨ã¦åãé·ãã§ããå¿ è¦ãããã¾ãã - - (b) PCRE_DOLLAR_ENDONLY ãè¨å®ããã¦ãããPCRE_MULTILINE ã - è¨å®ããã¦ããªãå ´åãã¡ã¿æå $ ã¯ãæååã®çµç«¯ã«ã®ã¿ããããã¾ãã - - (c) PCRE_EXTRA ãè¨å®ããã¦ããå ´åãããã¯ã¹ã©ãã·ã¥ã®å¾ã« - æåããã£ã¦ç¹ã«æå³ããªããã®ã¯ãã¨ã©ã¼ã¨ãªãã¾ãã - - (d) PCRE_UNGREEDY ãè¨å®ããã¦ãã¥4åãããã©ã«ãã§ã¯ - 貪欲ã§ãªãç¹°ãè¿ãæå®åã®è²ªæ¬²ãã¯å転ãã¾ããã - çå符ãå¾ãã«ã¤ãå ´åã¯ã貪欲ã«ãªãã¾ãã - </literallayout> + <para> + ããã§èª¬æããã®ã¯ãPerl 5.005 ã«é¢é£ãããã®ã§ãã + <orderedlist> + <listitem> + <simpara> + ããã©ã«ãã§ã¯ç©ºç½æå㯠C ã©ã¤ãã©ãªé¢æ° isspace() ãèªèãã + å ¨ã¦ã®æåã§ãããå¥ã®æååãã¼ãã«ãç¨ãã¦PCREãã³ã³ãã¤ã«ã + ããã¨ãå¯è½ã§ããé常ãisspace() ã¯ç©ºç½ããã©ã¼ã ãã£ã¼ããæ¹ + è¡ãè¤æ¹ãæ°´å¹³ã¿ããåç´ã¿ãã«ããããã¾ããPerl 5 ã§ã¯ããç©ºç½ + æåã®ä¸ã«åç´ã¿ããå«ãã§ãã¾ãããããªãåãã Perl ããã¥ã¡ + ã³ãã«ãã£ã \v ã¨ã¹ã±ã¼ãã¯ãå®éã¯èªèããã¦ãã¾ããã§ããã + ãããããã®æåèªä½ã¯å°ãªãã¨ã 5.002 ã¾ã§ã¯ç©ºç½æåã¨ãã¦å¦ç + ããã¦ãã¾ãã5.004 ããã³ 5.005 ã§ã¯ããã®æå㯠\s ã«ãããã + ã¾ããã + </simpara> + </listitem> + <listitem> + <simpara> + PCREã§ã¯ãå èªã¿è¨æ(assertion)æã«ç¹°ãè¿ãæ°ã®æå®ã使ç¨ã§ãã¾ + ãããPerlã¯ããã許å¯ãã¾ãããæå³ããéãã«åä½ãããã¨ãæ + å³ããããã§ã¯ããã¾ãããä¾ãã°ã(?!a){3} ã¯ã次ã®3æåã "a" + ã§ãªããã¨ãè¨æããããã§ã¯ããã¾ããããã®æå®ã¯ãæ¬¡ã®æåã + "a" ã§ã¯ãªããã¨ã3åè¨æããã ãã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + å¦å®ã®å èªã¿è¨æã®ä¸ã§çãããµããã¿ã¼ã³ãåå¾ããåæ°ã¯è¨ç®ã + ãã¾ããããªãã»ãããã¯ãã«ã®ä¸ã®å¯¾å¿ããã¨ã³ããªã¯è¨å®ããã¾ + ãããPerlã§ã¯ãè¨æã®ãããã³ã°ã«å¤±æããåã«ããããããã¿ã¼ + ã³ãããã®å¤æ°ãè¨å®ãã¾ããããããè¡ãããã®ã¯ãå¦å®ã®å èªã¿ + è¨æã®æã1ã¤ã ãã®å ´åã®ã¿ã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + ãã«æåæåã¯ãæ¤ç´¢å¯¾è±¡æååã§ãµãã¼ãããã¾ããããã¿ã¼ã³æ + ååã§ã¯ãµãã¼ãããã¾ãããããã¯ããã¿ã¼ã³æååã¯ã0ãçµç«¯ã¨ + ããé常ã®Cæååã¨ãã¦æ¸¡ãããããã§ããã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ + "\0"ã¯ããã«æåã表ããã¿ã¼ã³ã¨ãã¦ä½¿ç¨ãããã¨ãå¯è½ã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + 次ã®Perlã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã¯ããµãã¼ãããã¾ããã: \l, \u, + \L, \U, \E, \Q å®éãPerlã§ã¯ããããã¯ãã¿ã¼ã³ãããã³ã°ã¨ã³ + ã¸ã³ã®é¨åã§ã¯ãªããéå¸¸ã®æååå¦çã®é¨åã«å®è¨¼ããã¦ãã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + Perlã®\Gè¨æã¯ãä¸åã®ãã¿ã¼ã³ãããã«é¢ãããã®ã§ã¯ãªãããã + ãµãã¼ãããã¾ããã + </simpara> + </listitem> + <listitem> + <simpara> + æç¢ºã«è¿°ã¹ãã¨ãPCREã¯(?{code})æ§é ããµãã¼ããã¾ããã + </simpara> + </listitem> + <listitem> + <simpara> + Perl 5.005_02ã§ã¯ãæ¸ããã¿æã«ãã¿ã¼ã³ã®ä¸é¨ãç¹°ãè¿ãéã«åå¾ + ããæååã®è¨å®ã«é¢é£ããå¥å¦ãªåä½ãè¦ããããã¾ããä¾ãã°ã + "aba"ããã¿ã¼ã³/^(a(b)?)+$/ã«ãããã³ã°ããå ´åã$2ã«ã¯ãå¤"b" + ãè¨å®ããã¾ããã"aabbaa"ã/^(aa(bb)?)+$/ã«ããããããå ´åã + $2ã¯è¨å®ããã¾ããããããããã¿ã¼ã³ã/^(aa(b(b))?)+$/ã«å¤ãã + ã¨ã$2 (ããã³ $3)ãè¨å®ããã¾ããPerl 5.004ã§ã¯ã$2 ã¯ã©ã¡ãã® + ã±ã¼ã¹ã§ãè¨å®ããã¾ãPCREã§ã&true;ã«è¨å®ããã¾ããå°æ¥çã« + Perlãå¥ã®çç¾ã®ãªãç¶æ ã«å¤æ´ãããå ´åãPCREã追å¾ããå¯è½æ§ + ãããã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + ä»ã®æªè§£æ±ºã®çç¾ã¯ãPerl 5.005_02 ã§ã¯ããã¿ã¼ã³ + /^(a)?(?(1)a|b)+$/ ã¯æåå "a" ã«ããããã¾ãããPCRE ã§ã¯ãã + ãããªãã¨ãããã¨ã§ããããããPerl 㨠PCRE ã¯å ±ã« /^(a)?a/ ã§ + "a" ããããããå ´åã« $1 ãæªå®ç¾©ã®ã¾ã¾ã¨ãªãã¾ãã + </simpara> + </listitem> + <listitem> + <para> + PCREã¯ãPerlæ£è¦è¡¨ç¾ã®æ©è½ã«ããã¤ãã®æ¡å¼µæ©è½ãæä¾ãã¾ãã + <orderedlist> + <listitem> + <simpara> + å èªã¿è¨æã¯ãåºå®é·ã®æååã«ãããããå¿ è¦ãããã¾ãããå + èªã¿è¨æã®å¥ã®åæã¯ãç°ãªã£ãé·ãã®æååã«ããããããã¨ã + ã§ãã¾ããPerl 5.005 ã§ã¯å ¨ã¦åãé·ãã§ããå¿ è¦ãããã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + <link + linkend="pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLY</link>ã + è¨å®ããã¦ããã<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãè¨å® + ããã¦ããªãå ´åãã¡ã¿æå$ã¯ãæååã®çµç«¯ã«ã®ã¿ããããã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + <link linkend="pcre.pattern.modifiers">PCRE_EXTRA</link>ãè¨ + å®ããã¦ããå ´åãããã¯ã¹ã©ãã·ã¥ã®å¾ã«æåããã£ã¦ç¹ã«æå³ + ããªããã®ã¯ãã¨ã©ã¼ã¨ãªãã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + <link linkend="pcre.pattern.modifiers">PCRE_UNGREEDY</link>ã + è¨å®ããã¦ããå ´åãããã©ã«ãã§ã¯è²ªæ¬²ã§ãªãç¹°ãè¿ãæå®åã® + 貪欲ãã¯å転ãã¾ãããçå符ãå¾ãã«ã¤ãå ´åã¯ã貪欲ã«ãªãã¾ãã + </simpara> + </listitem> + </orderedlist> + </para> + </listitem> + </orderedlist> + </para> </refsect1> <refsect1 id="regexp.reference"> <title>æ£è¦è¡¨ç¾ã®è©³ç´°</title> <refsect2 id="regexp.introduction"> <title>å°å ¥</title> - <literallayout> - PCRE ã«ãããµãã¼ããããæ£è¦è¡¨ç¾ã®æ§æã以ä¸ã«ç¤ºãã¾ãã - æ£è¦è¡¨ç¾ã¯ãPerl ã®ããã¥ã¡ã³ããä»ã®å¤ãã®æ¸ç±ã«ãã㦠- è±å¯ãªä¾ã¨å ±ã«èª¬æããã¦ãã¾ãã - Jeffrey Friedl ãæ¸ãã O'Reilly çºåã® - "Mastering Regular Expressions" ã«ã¯ã詳細ã示ããã¦ãã¾ãã - ããã§ã®èª¬æã¯ãªãã¡ã¬ã³ã¹ããã¥ã¡ã³ãã¨ãã¦ä½¿ç¨ãããã¨ã - æå³ãã¦ãã¾ãã + <para> + PCREã«ãããµãã¼ããããæ£è¦è¡¨ç¾ã®æ§æã以ä¸ã«ç¤ºãã¾ãã + æ£è¦è¡¨ç¾ã¯ãPerlã®ããã¥ã¡ã³ããä»ã®å¤ãã®æ¸ç±ã«ãã㦠+ è±å¯ãªä¾ã¨å ±ã«èª¬æããã¦ãã¾ãã + Jeffrey Friedl ãæ¸ãã O'Reilly çºåã® + "Mastering Regular Expressions" ã«ã¯ã詳細ã示ããã¦ãã¾ãã + ããã§ã®èª¬æã¯ãªãã¡ã¬ã³ã¹ããã¥ã¡ã³ãã¨ãã¦ä½¿ç¨ãããã¨ã + æå³ãã¦ãã¾ãã - æ£è¦è¡¨ç¾ã¯ãã¿ã¼ã³ã§ãããæ¤ç´¢å¯¾è±¡æååã«å¯¾ãã¦å·¦ããå³ã«ãããã³ã°ã - è¡ããã¾ãã - ãã¿ã¼ã³ã®ä¸ã®å¤ãã®æåã¯ããèªä½ã表ããæ¤ç´¢å¯¾è±¡ã®å¯¾å¿ããæåã« - ããããã¾ããç°¡åãªä¾ããããã¨ã次ã®ãã¿ã¼ã³ - - The quick brown fox - - ã¯ãæ¤ç´¢å¯¾è±¡æååã®ããèªä½ã¨åãé¨åã«ããããã¾ãã - </literallayout> + æ£è¦è¡¨ç¾ã¯ãã¿ã¼ã³ã§ãããæ¤ç´¢å¯¾è±¡æååã«å¯¾ãã¦å·¦ããå³ã«ãããã³ã°ã + è¡ããã¾ãã + ãã¿ã¼ã³ã®ä¸ã®å¤ãã®æåã¯ããèªä½ã表ããæ¤ç´¢å¯¾è±¡ã®å¯¾å¿ããæåã« + ããããã¾ããç°¡åãªä¾ããããã¨ããã¿ã¼ã³ + <literal>The quick brown fox</literal> + ã¯ãæ¤ç´¢å¯¾è±¡æååã®ããèªä½ã¨åãé¨åã«ããããã¾ãã + </para> </refsect2> <refsect2 id="regexp.reference.meta"> <title>ã¡ã¿æå</title> - <literallayout> - æ£è¦è¡¨ç¾ã®å¼·åãã¯ããã¿ã¼ã³ä¸ã«è¤æ°ã®é¸æè¢ãç¹°ãè¿ã - ãå«ãè½åã«ãããã®ã§ãã - ãããã¯ã<emphasis>ã¡ã¿</emphasis>-<emphasis>æå</emphasis> ã - 使ç¨ãããã¿ã¼ã³ã«ããã¨ã³ã³ã¼ãããã¾ãã - ã¡ã¿æåã¯ããèªä½ã表ãã¾ãããã代ããã«ç¹æã®è§£éãè¡ããã¾ãã - - 2種é¡ã®ã¡ã¿æåãåå¨ãã¾ããçæ¹ã¯ããã©ã±ããã®ä¸ä»¥å¤ã«ãããã¿ã¼ã³ - ã§ä½¿ç¨å¯è½ãªãã®ã§ãããçæ¹ã¯ããã©ã±ããã®ä¸ã§ä½¿ç¨å¯è½ãªãã®ã§ãã - ãã©ã±ããã®å¤ã§ä½¿ç¨ãããã¡ã¿æåã«ã¯æ¬¡ã®ãããªãã®ãããã¾ãã - - \ ä¸è¬çãªã¨ã¹ã±ã¼ãæå - ^ æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®å§ã¾ããè¨æ - $ æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®çµãããè¨æ - . (ããã©ã«ãã§ã¯)æ¹è¡ãé¤ãå ¨ã¦ã®æåã«ããã - [ æåã¯ã©ã¹éå§ãå®ç¾© - | 鏿æã®éå§ - ( ãµããã¿ã¼ã³ã®éå§ - ) ãµããã¿ã¼ã³ã®çµäº - ? ( ã®æå³ãæ¡å¼µãã - ã¾ãã¯ã0 ã¾ãã¯1 åã®ç¹°ãè¿ã - ã¾ãã¯ãç¹°ãè¿ããæå°åãã - * 0 以ä¸ã®ç¹°ãè¿ã - + 1 以ä¸ã®ç¹°ãè¿ã - { æå°/æå¤§ç¹°ãè¿ãã®éå§ + <para> + æ£è¦è¡¨ç¾ã®å¼·åãã¯ããã¿ã¼ã³ä¸ã«è¤æ°ã®é¸æè¢ãç¹°ãè¿ããå«ãè½å + ã«ãããã®ã§ãããããã¯ã<emphasis>ã¡ã¿</emphasis>-<emphasis>æ + å</emphasis>ã使ç¨ãããã¿ã¼ã³ã«ããã¨ã³ã³ã¼ãããã¾ãã + ã¡ã¿æåã¯ããèªä½ã表ãã¾ãããã代ããã«ç¹æã®è§£éãè¡ããã¾ãã + </para> + <para> + 2種é¡ã®ã¡ã¿æåãåå¨ãã¾ããçæ¹ã¯ããã©ã±ããã®ä¸ä»¥å¤ã«ãããã¿ã¼ã³ + ã§ä½¿ç¨å¯è½ãªãã®ã§ãããçæ¹ã¯ããã©ã±ããã®ä¸ã§ä½¿ç¨å¯è½ãªãã®ã§ãã + ãã©ã±ããã®å¤ã§ä½¿ç¨ãããã¡ã¿æåã«ã¯æ¬¡ã®ãããªãã®ãããã¾ãã + <variablelist> + <varlistentry> + <term><emphasis>\</emphasis></term> + <listitem> + <simpara> + ä¸è¬çãªã¨ã¹ã±ã¼ãæå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>^</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®å§ã¾ããè¨æ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>$</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡(è¤æ°è¡ã¢ã¼ãã§ã¯è¡)ã®çµãããè¨æ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>.</emphasis></term> + <listitem> + <simpara> + (ããã©ã«ãã§ã¯)æ¹è¡ãé¤ãå ¨ã¦ã®æåã«ããã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>[</emphasis></term> + <listitem> + <simpara> + æåã¯ã©ã¹éå§ãå®ç¾© + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>]</emphasis></term> + <listitem> + <simpara> + æåã¯ã©ã¹ã®çµäº + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>|</emphasis></term> + <listitem> + <simpara> + 鏿æã®éå§ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>(</emphasis></term> + <listitem> + <simpara> + ãµããã¿ã¼ã³ã®éå§ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>)</emphasis></term> + <listitem> + <simpara> + ãµããã¿ã¼ã³ã®çµäº + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>?</emphasis></term> + <listitem> + <simpara> + ( ã®æå³ãæ¡å¼µããã¾ãã¯ã0 ã¾ãã¯1 åã®ç¹°ãè¿ãã¾ãã¯ãç¹°ã + è¿ããæå°åãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>*</emphasis></term> + <listitem> + <simpara> + 0以ä¸ã®ç¹°ãè¿ã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>+</emphasis></term> + <listitem> + <simpara> + 1以ä¸ã®ç¹°ãè¿ã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>{</emphasis></term> + <listitem> + <simpara> + æå°/æå¤§ç¹°ãè¿ãã®éå§ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>}</emphasis></term> + <listitem> + <simpara> + æå°/æå¤§ç¹°ãè¿ãã®çµäº + </simpara> + </listitem> + </varlistentry> + </variablelist> ãã¿ã¼ã³ä¸ã§ãã©ã±ããã®ä¸ã®é¨åã¯ã"æåã¯ã©ã¹" ã¨å¼ã°ãã¾ãã æåã¯ã©ã¹ã§ä½¿ããã¡ã¿æåã¯æ¬¡ã®ãã®ã ãã§ãã - \ ä¸è¬çãªã¨ã¹ã±ã¼ãæå - ^ æåã®æåã«ç¨ããå ´åã®ã¿ãã¯ã©ã¹ãå¦å® - - æåã®ç¯å²ã示ã - ] æåã¯ã©ã¹ã®çµäº - - 次ã®ã»ã¯ã·ã§ã³ã§ãåã¡ã¿æåã®ä½¿ç¨æ³ã®èª¬æãè¡ãã¾ãã - - </literallayout> + <variablelist> + <varlistentry> + <term><emphasis>\</emphasis></term> + <listitem> + <simpara> + ä¸è¬çãªã¨ã¹ã±ã¼ãæå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>^</emphasis></term> + <listitem> + <simpara> + æåã®æåã«ç¨ããå ´åã®ã¿ãã¯ã©ã¹ãå¦å® + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>-</emphasis></term> + <listitem> + <simpara> + æåã®ç¯å²ã示ã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>]</emphasis></term> + <listitem> + <simpara> + æåã¯ã©ã¹ãçµäºãã + </simpara> + </listitem> + </varlistentry> + </variablelist> + 次ã®ã»ã¯ã·ã§ã³ã§ãåã¡ã¿æåã®ä½¿ç¨æ³ã®èª¬æãè¡ãã¾ãã + </para> </refsect2> <refsect2 id="regexp.reference.backslash"> <title>ããã¯ã¹ã©ãã·ã¥</title> - <literallayout> - ããã¯ã¹ã©ãã·ã¥ã«ã¯ãããã¤ãã®ä½¿ç¨æ³ãããã¾ããã¾ãã - è±åã§ãªãæåãå¾ã«ç¶ãå ´åããã¦?åãæãã - ç¹å¥ãªæå³ã¯å¤±ããã¾ãããã®ããã¯ã¹ã©ãã·ã¥ã®ä½¿ãæ¹ã¯ã - æåã¯ã©ã¹ã®å å´ã¨å¤å´ã®ä¸¡æ¹ã§ä½¿ç¨å¯è½ã§ãã - - ä¾ãã°ã"*" æåã«ãããããããå ´åããã¿ã¼ã³ã« "\*" ãæ¸ãã¾ãã - ããã«ãããæ¬¡ã®æåãã¡ã¿æåã¨ãã¦è§£éããããã¨ããã¾ãã¨ã"\" ãä¼´ã£ãè±åã§ãªãæåãããã®æåèªä½ã表ããã¨ãä¿è¨¼ãã¾ããç¹ã«ãããã¯ã¹ã©ãã·ã¥ã«ãããããããå ´åã¯ã"\\" ã¨æ¸ãã¾ãã - + <para> + ããã¯ã¹ã©ãã·ã¥ã«ã¯ãããã¤ãã®ä½¿ç¨æ³ãããã¾ããã¾ãã + è±åã§ãªãæåãå¾ã«ç¶ãå ´åããã¦?åãæãã + ç¹å¥ãªæå³ã¯å¤±ããã¾ãããã®ããã¯ã¹ã©ãã·ã¥ã®ä½¿ãæ¹ã¯ã + æåã¯ã©ã¹ã®å å´ã¨å¤å´ã®ä¸¡æ¹ã§ä½¿ç¨å¯è½ã§ãã + </para> + <para> + ä¾ãã°ã"*" æåã«ãããããããå ´åããã¿ã¼ã³ã« "\*" ãæ¸ãã¾ãã + ããã«ãããæ¬¡ã®æåãã¡ã¿æåã¨ãã¦è§£éããããã¨ããã¾ãã¨ã + "\" ãä¼´ã£ãè±åã§ãªãæåãããã®æåèªä½ã表ããã¨ãä¿è¨¼ãã¾ãã + ç¹ã«ãããã¯ã¹ã©ãã·ã¥ã«ãããããããå ´åã¯ã"\\" ã¨æ¸ãã¾ãã + </para> + <para> ãã¿ã¼ã³ãã PCRE_EXTENDED ãªãã·ã§ã³ãä»ãã¦ã³ã³ãã¤ã«ããã¦ãã - å ´åã(æåã¯ã©ã¹ã®ä¸ã§ãªã)ãã¿ã¼ã³å ã®ç©ºç½æåããã³ - "#" ã¨æ¬¡ã®æ¹è¡æåã®éã®æåã¯ç¡è¦ããã¾ãã - ç©ºç½æåã¾ã㯠"#" ããã¿ã¼ã³ã®ä¸é¨ã¨ãã¦å«ããéã«ã¯ã - ããã¯ã¹ã©ãã·ã¥ã«ããã¨ã¹ã±ã¼ããããã¨ãã§ãã¾ãã - - ããã¯ã¹ã©ãã·ã¥ã®2çªç®ã®ä½¿ç¨æ³ã¯ãåºåãããªãæåã - ãã¿ã¼ã³å ã«ç®ã«è¦ããå½¢ã§ã¨ã³ã³ã¼ãããææ³ãæä¾ãããã®ã§ãã - ãã¿ã¼ã³ãçµäºããããã«æåãé¤ããåºåãããªãæåã®è¦ãæ¹ã« - ã¯ä½ã®å¶ç´ãããã¾ãããããã¿ã¼ã³ãããã¹ãç·¨éããéã«ã¯ãé常 - 次ã®ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ãç¨ããæ¹ããå ã®ãã¤ããªæåããã - ããç°¡åã§ãããã - - \a ã¢ã©ã¼ã ããã«æå (16é² 07) - \cx "control-x", ãã ã x ã¯ããããæå - \e ã¨ã¹ã±ã¼ã (16é² 1B) - \f æ¹ãã¼ã¸ (16é² 0C) - \n æ¹è¡ (16é² 0A) - \r 復帰 (16é² 0D) - \t ã¿ã (16é² 09) - \xhh 16鲿°ã§ hh ã®æå - \ddd 8鲿°ã§ ddd ã®æåã¾ãã¯å¾æ¹åç § - - "\cx" ã®æ£ç¢ºãªå¹æã¯ã次ã®ããã«ãªãã¾ãã"x" ãå°æåã®å ´åã - 大æåã«å¤æããã¾ããç¶ãã¦ãæåã®6ãããç®(16鲿° 40)ã - å転ããã¾ããã¤ã¾ãã"\cz" ã¯16鲿°ã® 1A ã«ãªãã¾ããã"\c{" - ã¯16鲿°ã® 3B ã«ãªãã"\c;" 㯠16鲿°ã® 7B ã«ãªãã¾ãã - - "\x" ã®å¾ã§ã¯ã2æ¡ã®16鲿°ãèªã¾ãã¾ãã(表ãæåã¯ã大æåã§ã - å°æåã§ãå¯ã§ã) - - "\0" ã§ã¯2æ¡ã¾ã§ã®8鲿°ãèªã¿ãã¾ãã¾ãã - 両æ¹ã®ã±ã¼ã¹ã¨ãã2æ¡ããå°ãªãå ´åã表ãã¦ããæåèªä½ã - 使ç¨ããã¾ããã¤ã¾ãã"\0\x\07" ã¯2ã¤ã®ãã«æåã®å¾ã«ãã«æå - ãç¶ãããã®ã表ãã¾ãã8鲿°ã表ãæåã«ã¤ãã¦ã¯ãæåã®ã¼ã - ã®å¾ã«2æ¡ã®æ°åãæå®ããããã«æ³¨æãã¦ä¸ããã - - ããã¯ã¹ã©ãã·ã¥ã®å¾ã«0以å¤ã®æ°åãç¶ãå ´åã®å¦çã¯ãè¤éã§ãã - æåã¯ã©ã¹ã®å¤ã§ã¯ãPCRE ã¯ç¶ãæ¡ã10鲿°ã¨ãã¦èªã¿ãã¿ã¾ãã - æ°åã10ãããå°ããå ´åãã¾ãã¯ãå¼ã®ä¸ã«å¤ãåå¾ããå·¦æ¬å¼§ã - ãã®æ°ä»¥ä¸ãã£ãå ´åãå ¨ä½ã®ã·ã¼ã±ã³ã¹ã¯ã<emphasis>徿¹</emphasis> - <emphasis>åç §</emphasis>ã¨ãã¦è§£éããã¾ãããã®åä½ã«é¢ãã説æ - ã¯ãæ¬å¼§ä»ãã®ãµããã¿ã¼ã³ã®èª¬æã®å¾ã«è¡ãã¾ãã - - æåã¯ã©ã¹ã®ä¸ã¾ãã¯10鲿°ã9ãã大ãããåå¾ãè¡ã£ããµããã¿ã¼ã³ - ããã®æ°ã«æºããªãå ´åãPCRE ã¯ããã¯ã¹ã©ãã·ã¥ã®å¾ããæå¤§3æåã®8鲿° - ãå度èªã¿ãã¿ããã®å¤ã®æä¸ä½ 8ããããã1ãã¤ããçæãã¾ãã - ç¶ãæ¡ã¯ããèªä½ã表ãã¾ããä¾ãã°ã - - \040 ã¯ç©ºç½ã®å¥ã®è¡¨è¨æ³ã§ã - \40 ã¯ãåãæå³ã§ãããã ããå¤ãå徿¸ã¿ã®ãµããã¿ã¼ã³ã - 40åæªæºã®å ´å - \7 ã¯å¸¸ã«å¾æ¹åç §ã§ã - \11 ã¯å¾æ¹åç §ã¾ãã¯ã¿ãã®å¥ã®è¡¨è¨æ³ã§ã - \011 ã¯å¸¸ã«ã¿ãã§ã - \0113 ã¯ã¿ãã®å¾ã«æå "3" ãç¶ãããã®ã§ã - \113 (99 ãè¶ ãã徿¹åç §ã¯ãªãã®ã§) 8鲿° 113 ã表ãæå - \377 ã¯1ãããã®ä¸¦ã³ã§æ§æããã1ãã¤ãã§ã - \81 ã¯å¾æ¹åç §ã¾ãã¯ããã«æåã®å¾ã«2ã¤ã®æå "8" ããã³ "1" ã - ç¶ãããã®ã§ãã - + å ´åã(æåã¯ã©ã¹ã®ä¸ã§ãªã)ãã¿ã¼ã³å ã®ç©ºç½æåããã³ + "#" ã¨æ¬¡ã®æ¹è¡æåã®éã®æåã¯ç¡è¦ããã¾ãã + ç©ºç½æåã¾ã㯠"#" ããã¿ã¼ã³ã®ä¸é¨ã¨ãã¦å«ããéã«ã¯ã + ããã¯ã¹ã©ãã·ã¥ã«ããã¨ã¹ã±ã¼ããããã¨ãã§ãã¾ãã + </para> + <para> + ããã¯ã¹ã©ãã·ã¥ã®2çªç®ã®ä½¿ç¨æ³ã¯ãåºåãããªãæåã + ãã¿ã¼ã³å ã«ç®ã«è¦ããå½¢ã§ã¨ã³ã³ã¼ãããææ³ãæä¾ãããã®ã§ãã + ãã¿ã¼ã³ãçµäºããããã«æåãé¤ããåºåãããªãæåã®è¦ãæ¹ã« + ã¯ä½ã®å¶ç´ãããã¾ãããããã¿ã¼ã³ãããã¹ãç·¨éããéã«ã¯ãé常 + 次ã®ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ãç¨ããæ¹ããå ã®ãã¤ããªæåããã + ããç°¡åã§ãããã + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\a</emphasis></term> + <listitem> + <simpara> + ã¢ã©ã¼ã ããã«æå (16é² 07) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\cx</emphasis></term> + <listitem> + <simpara> + "control-x", ãã ã x ã¯ããããæå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\e</emphasis></term> + <listitem> + <simpara> + ã¨ã¹ã±ã¼ã (16é² 1B) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\f</emphasis></term> + <listitem> + <simpara> + æ¹ãã¼ã¸ (16é² 0C) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\n</emphasis></term> + <listitem> + <simpara> + æ¹è¡ (16é² 0A) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\r</emphasis></term> + <listitem> + <simpara> + 復帰 (16é² 0D) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\t</emphasis></term> + <listitem> + <simpara> + ã¿ã (16é² 09) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\xhh</emphasis></term> + <listitem> + <simpara> + 16鲿°ã§ hh ã®æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\ddd</emphasis></term> + <listitem> + <simpara> + 8鲿°ã§ ddd ã®æåã¾ãã¯å¾æ¹åç § + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + "\cx" ã®æ£ç¢ºãªå¹æã¯ã次ã®ããã«ãªãã¾ãã"x" ãå°æåã®å ´åã + 大æåã«å¤æããã¾ããç¶ãã¦ãæåã®6ãããç®(16鲿° 40)ã + å転ããã¾ããã¤ã¾ãã"\cz" ã¯16鲿°ã® 1A ã«ãªãã¾ããã"\c{" + ã¯16鲿°ã® 3B ã«ãªãã"\c;" 㯠16鲿°ã® 7B ã«ãªãã¾ãã + </para> + <para> + "\x" ã®å¾ã§ã¯ã2æ¡ã®16鲿°ãèªã¾ãã¾ãã(表ãæåã¯ã大æåã§ã + å°æåã§ãå¯ã§ã)"\0"ã§ã¯2æ¡ã¾ã§ã®8鲿°ãèªã¿ãã¾ãã¾ãã + 両æ¹ã®ã±ã¼ã¹ã¨ãã2æ¡ããå°ãªãå ´åã表ãã¦ããæåèªä½ã + 使ç¨ããã¾ããã¤ã¾ãã"\0\x\07" ã¯2ã¤ã®ãã«æåã®å¾ã«ãã«æå + ãç¶ãããã®ã表ãã¾ãã8鲿°ã表ãæåã«ã¤ãã¦ã¯ãæåã®ã¼ã + ã®å¾ã«2æ¡ã®æ°åãæå®ããããã«æ³¨æãã¦ä¸ããã + </para> + <para> + ããã¯ã¹ã©ãã·ã¥ã®å¾ã«0以å¤ã®æ°åãç¶ãå ´åã®å¦çã¯ãè¤éã§ãã + æåã¯ã©ã¹ã®å¤ã§ã¯ãPCRE ã¯ç¶ãæ¡ã10鲿°ã¨ãã¦èªã¿ãã¿ã¾ãã + æ°åã10ãããå°ããå ´åãã¾ãã¯ãå¼ã®ä¸ã«å¤ãåå¾ããå·¦æ¬å¼§ã + ãã®æ°ä»¥ä¸ãã£ãå ´åãå ¨ä½ã®ã·ã¼ã±ã³ã¹ã¯ã<emphasis>徿¹</emphasis> + <emphasis>åç §</emphasis>ã¨ãã¦è§£éããã¾ãããã®åä½ã«é¢ãã説æ + ã¯ãæ¬å¼§ä»ãã®ãµããã¿ã¼ã³ã®èª¬æã®å¾ã«è¡ãã¾ãã + </para> + <para> + æåã¯ã©ã¹ã®ä¸ã¾ãã¯10鲿°ã9ãã大ãããåå¾ãè¡ã£ããµããã¿ã¼ã³ + ããã®æ°ã«æºããªãå ´åãPCRE ã¯ããã¯ã¹ã©ãã·ã¥ã®å¾ããæå¤§3æåã®8鲿° + ãå度èªã¿ãã¿ããã®å¤ã®æä¸ä½ 8ããããã1ãã¤ããçæãã¾ãã + ç¶ãæ¡ã¯ããèªä½ã表ãã¾ããä¾ãã°ã + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\040</emphasis></term> + <listitem> + <simpara> + ã¯ç©ºç½ã®å¥ã®è¡¨è¨æ³ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\40</emphasis></term> + <listitem> + <simpara> + ã¯ãåãæå³ã§ãããã ããå¤ãå徿¸ã¿ã®ãµããã¿ã¼ã³ã40åæª + æºã®å ´åã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\7</emphasis></term> + <listitem> + <simpara> + ã¯å¸¸ã«å¾æ¹åç §ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\11</emphasis></term> + <listitem> + <simpara> + ã¯å¾æ¹åç §ã¾ãã¯ã¿ãã®å¥ã®è¡¨è¨æ³ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\011</emphasis></term> + <listitem> + <simpara> + ã¯å¸¸ã«ã¿ãã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\0113</emphasis></term> + <listitem> + <simpara> + ã¯ã¿ãã®å¾ã«æå "3" ãç¶ãããã®ã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\113</emphasis></term> + <listitem> + <simpara> + (99 ãè¶ ãã徿¹åç §ã¯ãªãã®ã§) 8鲿° 113 ã表ãæåã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\377</emphasis></term> + <listitem> + <simpara> + ã¯1ãããã®ä¸¦ã³ã§æ§æããã1ãã¤ãã§ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\81</emphasis></term> + <listitem> + <simpara> + ã¯å¾æ¹åç §ã¾ãã¯ããã«æåã®å¾ã«2ã¤ã®æå "8" ããã³ "1" ã + ç¶ãããã®ã§ãã + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> 3æ¡ãè¶ ãã¦8鲿°ã¯èªã¿ãã¾ããªããããå¤ã100以ä¸ã®8鲿°ã«ã¯ ã¼ããåã«ã¤ããã¹ãã§ã¯ãªããã¨ã«æ³¨æãã¦ãã ããã - + </para> + <para> 1ãã¤ãã®å¤ãå®ç¾©ããããããã·ã¼ã±ã³ã¹ã¯ãæåã¯ã©ã¹ã®å é¨ ããã³å¤é¨ã§ä½¿ç¨å¯è½ã§ããå ãã¦ãæåã¯ã©ã¹ã®å é¨ã§ã¯ã·ã¼ã±ã³ã¹ "\b" ã¯ããã¯ã¹ãã¼ã¹(16é² 0x)ã¨ãã¦è§£éããã¾ãã æåã¯ã©ã¹ã®å¤ã§ã¯ãå¥ã®æå³ãæãã¾ãã(以ä¸ãåç §ä¸ãã) - + </para> + <para> ããã¯ã¹ã©ãã·ã¥ã®ç¬¬3ã®ä½¿ç¨æ³ã¯ãå æ¬çãªæååãæå®ããç¨é ã§ãã - - \d 10鲿°å - \D 10鲿°åã§ãªãå ¨ã¦ã®æå - \s ç©ºç½æå - \S ç©ºç½æå以å¤ã®æå - \w åèªæ§ææå - \W åèªæ§ææåä»¥å¤ - - ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã®åçµã¯ãå ¨æåã®éåã2ã¤ã®éåã« - åå²ãã¾ããå ¨ã¦ã®æåã¯ãåçµã®ãã¡ãçæ¹ã ?kããããã¾ãã - - åèªæ§ææåã¨ã¯è±åã¾ãã¯æ°åã¾ãã¯ã¢ã³ãã¼ã¹ã³ã¢æåã§ããã - Perl ã® "åèª" ã¨æãå¾ãæåã®ãã¨ã§ãã - æåããã³æ°åã®å®ç¾©ã¯ãPCRE ã®æåãã¼ãã«ã«ããå¶å¾¡ããã - ãã±ã¼ã«ãæå®ããããããè¡ã£ãå ´åã«ã¯å¤ããå¯è½æ§ãããã¾ãã - ("ãã±ã¼ã«ã®ãµãã¼ã"ãåç §ä¸ãã) - ä¾ãã°ã"fr" (ãã©ã³ã¹èª)ãã±ã¼ã«ã®å ´åãããã¤ãã®128ãè¶ ãã - æåã³ã¼ãã®æåã¯ãã¢ã¯ã»ã³ãä»ãã®æåã«ä½¿ç¨ããã¦ããã - ããã㯠\w ã«ããããã¾ãã - + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\d</emphasis></term> + <listitem> + <simpara> + 10鲿°å + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\D</emphasis></term> + <listitem> + <simpara> + 10鲿°åã§ãªãå ¨ã¦ã®æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\s</emphasis></term> + <listitem> + <simpara> + ç©ºç½æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\S</emphasis></term> + <listitem> + <simpara> + ç©ºç½æå以å¤ã®æå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\w</emphasis></term> + <listitem> + <simpara> + åèªæ§ææå + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\W</emphasis></term> + <listitem> + <simpara> + åèªæ§ææåä»¥å¤ + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + ã¨ã¹ã±ã¼ãã·ã¼ã±ã³ã¹ã®åçµã¯ãå ¨æåã®éåã2ã¤ã®éåã« + åå²ãã¾ããå ¨ã¦ã®æåã¯ãåçµã®ãã¡ãçæ¹ã ?kããããã¾ãã + </para> + <para> + åèªæ§ææåã¨ã¯è±åã¾ãã¯æ°åã¾ãã¯ã¢ã³ãã¼ã¹ã³ã¢æåã§ããã + Perl ã® "åèª" ã¨æãå¾ãæåã®ãã¨ã§ãã + æåããã³æ°åã®å®ç¾©ã¯ãPCRE ã®æåãã¼ãã«ã«ããå¶å¾¡ããã + ãã±ã¼ã«ãæå®ããããããè¡ã£ãå ´åã«ã¯å¤ããå¯è½æ§ãããã¾ãã + ("ãã±ã¼ã«ã®ãµãã¼ã"ãåç §ä¸ãã) + ä¾ãã°ã"fr" (ãã©ã³ã¹èª)ãã±ã¼ã«ã®å ´åãããã¤ãã®128ãè¶ ãã + æåã³ã¼ãã®æåã¯ãã¢ã¯ã»ã³ãä»ãã®æåã«ä½¿ç¨ããã¦ããã + ããã㯠\w ã«ããããã¾ãã + </para> + <para> ãããã®æååã·ã¼ã±ã³ã¹ã¯ãæåã¯ã©ã¹ã®å å¤ã«ããã使ç¨å¯è½ ã§ãããããã¯ãé©å½ãªåã®1æåã«ããããã¾ããç¾å¨ãããã³ã° ãè¡ã£ã¦ããä½ç½®ãæ¤ç´¢å¯¾è±¡æååã®çµç«¯ã§ããå ´åããããã§ãã æåã¯ãªãã®ã§å ¨ã¦ã®ãããã³ã°ã¯å¤±æãã¾ãã - + </para> + <para> ããã¯ã¹ã©ãã·ã¥ã®ç¬¬4ã®ä½¿ç¨æ³ã¯ãåç´ãªè¨æã§ãã è¨æã¯ãæ¤ç´¢å¯¾è±¡æååããæåãå ¨ãæãåºããã« ããããç¹å®ã®ä½ç½®ã§çããã¨ããæææ¡ä»¶ãæå®ãã¾ãã ããè¤éãªè¨æã«é¢ãããµããã¿ã¼ã³ã®ä½¿ç¨æ³ã以ä¸ã«èª¬æãã¾ãã ããã¯ã¹ã©ãã·ã¥ä»ãã®è¨æã¯æ¬¡ã®ãã®ãããã¾ãã - - \b åèªã®å¢ç - \B åèªã®å¢çã§ãªã - \A æ¤ç´¢å¯¾è±¡ã®å§ã¾ã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) - \Z æ¤ç´¢å¯¾è±¡ã®çµããã¾ãã¯çµç«¯ã®æ¹è¡ (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) - \z æ¤ç´¢å¯¾è±¡ã®çµãã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) - - ãããã®è¨æã¯ãæåã¯ã©ã¹ã«ã¯ä½¿ç¨ã§ãã¾ããã(ããããæåã¯ã©ã¹ã® - ä¸ã§ã¯ã"\b" ã«ã¯å¥ã®æå³ãã¤ã¾ããããã¯ã¹ãã¼ã¹æåã¨ããæå³ã - ãããã¨ã«æ³¨æãã¦ãã ãã) - - åèªã®å¢çã¯ãæ¤ç´¢å¯¾è±¡æååã«ããã¦ãç¾å¨ã®æåããã³åã®æåã - 両æ¹ã¯ \w ã¾ã㯠\W ã«ãããããªã - (ããªãã¡ãçæ¹ã¯ \w ã«ããããã¦ãããçæ¹ã¯\W ã«ããããã)ãã - ã¾ãã¯ãæåã®ã¾ãã¯æå¾ã®æåã \w ã«ããããããªãã°ã - ãããããæååã®å§ãã¾ãã¯çµããã®ä½ç½®ã§ãã - - è¨æ \A, \A, \z ã¯ã(以ä¸ã«èª¬æãã)ã©ããªãªãã·ã§ã³ãè¨å®ãã¦ã - æååã®å§ç«¯ããã³çµç«¯ã«ã®ã¿ããããããããè¨å·ããã³ãã«è¨å· - ã¨ã¯ç°ãªã£ã¦ãã¾ãã - ãããã®è¨æã¯ãPCRE_NOTBOL ã¾ã㯠PCRE_NOTEOL ãªãã·ã§ã³ã®å½±é¿ã - åãã¾ããã\Z åã³ \z ã®éãã¯ã\Z ã¯ãæååã®çµç«¯ã¨åæã« - æååã®æå¾ã®æåãæ¹è¡ã®å ´åã«åã®æåã«ãã£Ãããã®ã«å¯¾ãã - \z ã¯çµç«¯ã«ã®ã¿ããããã¾ãã - </literallayout> + </para> + <para> + <variablelist> + <varlistentry> + <term><emphasis>\b</emphasis></term> + <listitem> + <simpara> + åèªã®å¢ç + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\B</emphasis></term> + <listitem> + <simpara> + åèªã®å¢çã§ãªã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\A</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡ã®å§ã¾ã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\Z</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡ã®çµããã¾ãã¯çµç«¯ã®æ¹è¡ (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><emphasis>\z</emphasis></term> + <listitem> + <simpara> + æ¤ç´¢å¯¾è±¡ã®çµãã (è¤æ°è¡ã¢ã¼ãã¨ã¯ç¬ç«) + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + ãããã®è¨æã¯ãæåã¯ã©ã¹ã«ã¯ä½¿ç¨ã§ãã¾ããã(ããããæåã¯ã©ã¹ã® + ä¸ã§ã¯ã"<literal>\b</literal>" ã«ã¯å¥ã®æå³ãã¤ã¾ããããã¯ã¹ãã¼ + ã¹æåã¨ããæå³ããããã¨ã«æ³¨æãã¦ãã ãã) + </para> + <para> + åèªã®å¢çã¯ãæ¤ç´¢å¯¾è±¡æååã«ããã¦ãç¾å¨ã®æåããã³åã®æåã + 両æ¹ã¯<literal>\w</literal>ã¾ãã¯<literal>\W</literal>ã«ãããã + ãªã(ããªãã¡ãçæ¹ã¯<literal>\w</literal>ã«ããããã¦ãããçæ¹ + ã¯<literal>\W</literal>ã«ããããã)ããã¾ãã¯ãæåã®ã¾ãã¯æå¾ + ã®æåã<literal>\w</literal>ã«ããããããªãã°ããããããæå + åã®å§ãã¾ãã¯çµããã®ä½ç½®ã§ãã + </para> + <para> + è¨æ<literal>\A</literal>, <literal>\Z</literal>, + <literal>\z</literal>ã¯ã(以ä¸ã«èª¬æãã)ã©ããªãªãã·ã§ã³ãè¨å® + ãã¦ãæååã®å§ç«¯ããã³çµç«¯ã«ã®ã¿ããããããããè¨å·ããã³ãã« + è¨å·ã¨ã¯ç°ãªã£ã¦ãã¾ãã + ãããã®è¨æã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_NOTBOL</link>ã¾ãã¯<link + linkend="pcre.pattern.modifiers">PCRE_NOTEOL</link>ãªãã·ã§ã³ã® + å½±é¿ãåãã¾ããã<literal>\Z</literal>åã³<literal>\z</literal> + ã®éãã¯ã<literal>\Z</literal>ã¯ãæååã®çµç«¯ã¨åæã«æååã® + æå¾ã®æåãæ¹è¡ã®å ´åã«åã®æåã«ãããããã®ã«å¯¾ãã + <literal>\z</literal>ã¯çµç«¯ã«ã®ã¿ããããã¾ãã + </para> </refsect2> <refsect2 id="regexp.reference.circudollar"> @@ -1187,124 +1643,134 @@ ãå¿ è¦ã¯ããã¾ãããã使ç¨ã??æã®æå¾ã®ã¢ã¤ãã ã§ããå¿ è¦ ãããã¾ãããã«è¨å·ã¯ãæåã¯ã©ã¹ã®ä¸ã§ã¯ç¹å¥ãªæå³ãæãã¾ ããã - - ãã«è¨å·ã®æå³ã¯ãã³ã³ãã¤ã«æã¾ãã¯ãããã³ã°æã® - PCRE_DOLLAR_ENDONLY ãªãã·ã§ã³ã®è¨å®ã«ãã - æååã®çµç«¯ã«ã®ã¿ãããããããã«å¤æ´ãããã¨ãå¯è½ã§ãã - ãã®ãã£ã¦ãã¯ã\Z è¨æã«ã¯å½±é¿ãä¸ãã¾ããã - - ãããè¨å·ã¨ãã«è¨å·ã®æå³ã¯ãPCRE_MULTILINE ãªãã·ã§ã³ãè¨å® - ããå ´åã«å¤åãã¾ãããããè¨å®ããå ´åã対象æååã®å§ç«¯åã³ - çµç«¯ã«ãããããã®ã«å ãã¦ãæååå é¨ã® "\n" æåã®ç´å - åã³ç´å¾ã«ããããããããã¾ããä¾ãã°ããã¿ã¼ã³ /^abc$/ 㯠- è¤æ°è¡ã¢ã¼ãã§ã¯å¯¾è±¡æåå "def\nabc" ã«ããããã¾ããã - ããã§ãªãå ´åã¯ããããã¾ãããçµæã¨ãã¦ã - å ¨ã¦ã®æã "^" ã§å§ã¾ããããåä¸è¡ã¢ã¼ãã§ã¢ã³ã«ã¼ä»ãã®ãã¿ - ã¼ã³ã¯ãè¤æ°è¡ã¢ã¼ãã§ã¯ã¢ã³ã«ã¼ç¡ãã¨ãªãã¾ãã - PCRE_DOLLAR_ENDONLY ãªãã·ã§ã³ã¯ãPCRE_MULTILINE ãè¨å®ããã¦ãã - å ´åã¯ç¡è¦ããã¾ãã - - 両æ¹ã®ã¢ã¼ãã§å¯¾è±¡ã®å§ç«¯ããã³çµç«¯ã«ããããããããã« - ã·ã¼ã±ã³ã¹ \A, \Z, \z ã使ç¨åºæ¥ããã¨ã«æ³¨æãã¦ãã ããã - ãã¿ã¼ã³ã®æã \A ãä»ãã¦å§ã¾ãå ´åã - PCRE_MULTILINE ã®è¨å®ã«ãããã常ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã + + ãã«è¨å·ã®æå³ã¯ãã³ã³ãã¤ã«æã¾ãã¯ãããã³ã°æã® + <link linkend="pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLY</link> + ãªãã·ã§ã³ã®è¨å®ã«ããæååã®çµç«¯ã«ã®ã¿ãããããããã«å¤æ´ãã + ãã¨ãå¯è½ã§ãããã®è¨å®ã¯ã\Z è¨æã«ã¯å½±é¿ãä¸ãã¾ããã + + ãããè¨å·ã¨ãã«è¨å·ã®æå³ã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãªãã·ã§ã³ + ãè¨å®ããå ´åã«å¤åãã¾ãããããè¨å®ããå ´åã対象æååã®å§ç«¯ + åã³çµç«¯ã«ãããããã®ã«å ãã¦ãæååå é¨ã® "\n" æåã®ç´å + åã³ç´å¾ã«ããããããããã¾ããä¾ãã°ããã¿ã¼ã³ /^abc$/ 㯠+ è¤æ°è¡ã¢ã¼ãã§ã¯å¯¾è±¡æåå "def\nabc" ã«ããããã¾ããã + ããã§ãªãå ´åã¯ããããã¾ãããçµæã¨ãã¦ã + å ¨ã¦ã®æã "^" ã§å§ã¾ããããåä¸è¡ã¢ã¼ãã§ã¢ã³ã«ã¼ä»ãã®ãã¿ + ã¼ã³ã¯ãè¤æ°è¡ã¢ã¼ãã§ã¯ã¢ã³ã«ã¼ç¡ãã¨ãªãã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLY</link> + ãªãã·ã§ã³ã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãè¨å®ãã + ã¦ããå ´åã¯ç¡è¦ããã¾ãã + + 両æ¹ã®ã¢ã¼ãã§å¯¾è±¡ã®å§ç«¯ããã³çµç«¯ã«ããããããããã« + ã·ã¼ã±ã³ã¹ \A, \Z, \z ã使ç¨åºæ¥ããã¨ã«æ³¨æãã¦ãã ããã + ãã¿ã¼ã³ã®æã \A ãä»ãã¦å§ã¾ãå ´åã + <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ã®è¨ + å®ã«ãããã常ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã </literallayout> </refsect2> - <refsect2 id="regexp.reference.dot"> - <title>çµæ¢ç¬¦</title> + + <refsect2 id="regexp.reference.dot"> + <title>çµæ¢ç¬¦</title> <literallayout> - æåã¯ã©ã¹ã®å¤å´ã§ã¯ããã¿ã¼ã³ã®ä¸ã®ãããã¯éåºåæåãå«ã - (ããã©ã«ãã§ã¯)æ¹è¡ä»¥å¤ã®å¯¾è±¡ã®å ¨ã¦ã®1æåã«ããããã¾ãã - PCRE_DOTALL ãªãã·ã§ã³ãè¨å®ããå ´åããããã¯æ¹è¡ã«ãããã - ãã¾ãããããã®å¦çã¯ããããè¨å·ããã³ãã«è¨å·ã¨ã¯å®å ¨ã«ç¬ç«ã - ã¦ãã¾ããå ±éãªç¹ã¯å ±ã«æ¹è¡æåãå«ããã¨ã ãã§ãã - ãããã¯ãæåã¯ã©ã¹ã®ä¸ã§ã¯ç¹å¥ãªæå³ãæã¡ã¾ããã + æåã¯ã©ã¹ã®å¤å´ã§ã¯ããã¿ã¼ã³ã®ä¸ã®ãããã¯éåºåæåãå«ã + (ããã©ã«ãã§ã¯)æ¹è¡ä»¥å¤ã®å¯¾è±¡ã®å ¨ã¦ã®1æåã«ããããã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãªãã·ã§ + ã³ãè¨å®ããå ´åããããã¯æ¹è¡ã«ãããããã¾ãããããã®å¦çã¯ã + ãããè¨å·ããã³ãã«è¨å·ã¨ã¯å®å ¨ã«ç¬ç«ãã¦ãã¾ããå ±éãªç¹ã¯å ±ã« + æ¹è¡æåãå«ããã¨ã ãã§ãã + ãããã¯ãæåã¯ã©ã¹ã®ä¸ã§ã¯ç¹å¥ãªæå³ãæã¡ã¾ããã </literallayout> </refsect2> - <refsect2 id="regexp.reference.squarebrackets"> - <title>è§æ¬å¼§</title> - <literallayout> - å·¦ãã©ã±ããã¯æåã¯ã©ã¹ã®éå§ã表ããå³ãã©ã±ããã«ããçµäº - ãã¾ããå³ãã©ã±ããã¯ãããèªä½ç¹å¥ãªãã®ã§ã¯ããã¾ããã - å³ãã©ã±ãããã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã(ãããã㪠- ãã°ãæåã«ãããè¨å·ãæã£ã¦ããå¾ã§)ã¯ã©ã¹ã®æåã®æåã - ã¼?gããããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå¿ è¦ãããã¾ãã - - æåã¯ã©ã¹ã¯ã対象ã®1æåã«ããããã¾ãããã®æåã¯ã¯ã©ã¹ã«ãã - å®ç¾©ãããæåéåã®ä¸ã«ããå¿ è¦ãããã¾ãããã ãã - ã¯ã©ã¹ã®æåã®æåããããè¨å·ã®å ´åã¯ã対象æåã¯æ®ããã«ãã - å®ç¾©ãããéåã®ã課å ãã£ã¦ã¯ãªãã¾ããã - ãããè¨å·ãã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã¯ãå¿ ããæåã® - æåã¨ããªãããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã«ãã¦ä¸ - ããã - ä¾ãã°ãæåã¯ã©ã¹ [aeiou] ã¯å°æåã®æ¯é³ã«ããããã¾ããã - [^aeiou] ã¯å°æåã®æ¯é³ä»¥å¤ã®æåã«ããããã¾ãã - ãããè¨å·ã¯ãåå¨ããªããã®ãåæãããã¨ã«ããã¯ã©ã¹ã«ãã - æåãæå®ãã便å©ãªè¡¨è¨ã§ãã - ãããè¨å·ã¯ãè¨æã§ã¯ããã¾ããã対象æååããæåãæ¶è²»ãã - ç¾å¨ã®ãã¤ã³ã¿ãæååã®çµç«¯ã«ããå ´åã«ã¯å¤±æãã¾ãã - - 大æåå°æåãåºå¥ããªãããããè¡ãããå ´åãã¯ã©ã¹ã®æå㯠- 大æåã»å°æåã®ä¸¡æ¹ã表ãã¾ããããã¯ãä¾ãã°ã大æåå°æå - ãåºå¥ããªãå ´åã®ããã [aeiou] 㯠"a" ã¨åæ§ã« "A" ã«ããã - ããæåå°æåãåºå¥ããªãå ´åã®ããã [^aeiou] 㯠"A" ã«ãã - ããã¾ããã䏿¹ã大æåå°æåãåºå¥ããå ´åã¯ããããã¾ãã - - PCRE_DOTALL ã¾ã㯠PCRE_MULTILINE ãªãã·ã§ã³ãã©ã®ããã«è¨å® - ãããã¨ãæ¹è¡æåã¯ãæåã¯ã©ã¹ã«ããã¦ç¹å¥ãªæ¹æ³ã§å¦çãã - ã¾ããã[^a] ã®ãããªã¯ã©ã¹ã¯å¸¸ã«æ¹è¡ã«ããããã¾ãã - - ãã¤ãã¹ (ãã¤ãã³)æåã¯æåã¯ã©ã¹ã®ä¸ã§æåã®ç¯å²ãæå®ãã - ããã«ä½¿ç¨ããã¾ããä¾ãã°ã[d-m] 㯠d 㨠m ã®éã®ãããã - æåã«ããããã¾ããéã«ãã¹æåãã¯ã©ã¹ã®ä¸ã«å¿ è¦ãªå ´åã¯ã - ããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã¯ã©ã¹ã®æåã¾ãã¯æå¾ã® - ãããªç¯å²ã示ãã¨ã¯è§£éãããªãå ´æã«ä½¿ç¨ãã¦ä¸ããã - æåãªãã©ã« "]" ãç¯å²ã®æå¾ã®æåã¨ãã¦ä½¿ç¨ãããã¨ã¯ã§ãã¾ - ããã[W-]46] ã®ãããªãã¿ã¼ã³ã¯ã2ã¤æåã®ã¯ã©ã¹("W" ããã³ + <refsect2 id="regexp.reference.squarebrackets"> + <title>è§æ¬å¼§</title> + <literallayout> + å·¦ãã©ã±ããã¯æåã¯ã©ã¹ã®éå§ã表ããå³ãã©ã±ããã«ããçµäº + ãã¾ããå³ãã©ã±ããã¯ãããèªä½ç¹å¥ãªãã®ã§ã¯ããã¾ããã + å³ãã©ã±ãããã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã(ãããã㪠+ ãã°ãæåã«ãããè¨å·ãæã£ã¦ããå¾ã§)ã¯ã©ã¹ã®æåã®æåãã¼ã¿ + ãããããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå¿ è¦ãããã¾ãã + + æåã¯ã©ã¹ã¯ã対象ã®1æåã«ããããã¾ãããã®æåã¯ã¯ã©ã¹ã«ãã + å®ç¾©ãããæåéåã®ä¸ã«ããå¿ è¦ãããã¾ãããã ãã + ã¯ã©ã¹ã®æåã®æåããããè¨å·ã®å ´åã¯ã対象æåã¯æ®ããã«ãã + å®ç¾©ãããéåã®ã課å ãã£ã¦ã¯ãªãã¾ããã + ãããè¨å·ãã¯ã©ã¹ã®ã¡ã³ãã¼ã¨ãã¦å¿ è¦ãªå ´åã¯ãå¿ ããæåã® + æåã¨ããªãããããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã«ãã¦ä¸ + ããã + + ä¾ãã°ãæåã¯ã©ã¹ [aeiou] ã¯å°æåã®æ¯é³ã«ããããã¾ããã + [^aeiou] ã¯å°æåã®æ¯é³ä»¥å¤ã®æåã«ããããã¾ãã + ãããè¨å·ã¯ãåå¨ããªããã®ãåæãããã¨ã«ããã¯ã©ã¹ã«ãã + æåãæå®ãã便å©ãªè¡¨è¨ã§ãã + ãããè¨å·ã¯ãè¨æã§ã¯ããã¾ããã対象æååããæåãæ¶è²»ãã + ç¾å¨ã®ãã¤ã³ã¿ãæååã®çµç«¯ã«ããå ´åã«ã¯å¤±æãã¾ãã + + 大æåå°æåãåºå¥ããªãããããè¡ãããå ´åãã¯ã©ã¹ã®æå㯠+ 大æåã»å°æåã®ä¸¡æ¹ã表ãã¾ããããã¯ãä¾ãã°ã大æåå°æå + ãåºå¥ããªãå ´åã®ããã [aeiou] 㯠"a" ã¨åæ§ã« "A" ã«ããã + ããæåå°æåãåºå¥ããªãå ´åã®ããã [^aeiou] 㯠"A" ã«ãã + ããã¾ããã䏿¹ã大æåå°æåãåºå¥ããå ´åã¯ããããã¾ãã + + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ã¾ã㯠+ <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãªã + ã·ã§ã³ãã©ã®ããã«è¨å®ãããã¨ãæ¹è¡æåã¯ãæåã¯ã©ã¹ã«ããã¦ç¹ + å¥ãªæ¹æ³ã§å¦çããã¾ããã[^a] ã®ãããªã¯ã©ã¹ã¯å¸¸ã«æ¹è¡ã«ããã + ãã¾ãã + + ãã¤ãã¹ (ãã¤ãã³)æåã¯æåã¯ã©ã¹ã®ä¸ã§æåã®ç¯å²ãæå®ãã + ããã«ä½¿ç¨ããã¾ããä¾ãã°ã[d-m] 㯠d 㨠m ã®éã®ãããã + æåã«ããããã¾ããéã«ãã¹æåãã¯ã©ã¹ã®ä¸ã«å¿ è¦ãªå ´åã¯ã + ããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããããã¯ã©ã¹ã®æåã¾ãã¯æå¾ã® + ãããªç¯å²ã示ãã¨ã¯è§£éãããªãå ´æã«ä½¿ç¨ãã¦ä¸ããã + æåãªãã©ã« "]" ãç¯å²ã®æå¾ã®æåã¨ãã¦ä½¿ç¨ãããã¨ã¯ã§ãã¾ + ããã[W-]46] ã®ãããªãã¿ã¼ã³ã¯ã2ã¤æåã®ã¯ã©ã¹("W" ããã³ "-")ã®å¾ã«ãªãã©ã«æåå "46]" ãç¶ãã¦ããã¯ã©ã¹ã¨ãã¦è§£é - ããã"W46]"ã¾ã㯠"-46]" ã«ããããã¾ããããããç¯å²ã®çµç«¯ - ã¨ãã¦è§£éããã "]" ãããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå ´åã - [W-\]46] ã¯ç¯å²ã®å¾ã«2ã¤ã®æåãç¶ãä¸ã¤ã®ã¯ã©ã¹ã¨ãã¦è§£éã - ãã¾ãã"]" ã®8é²ãããã¯16é²è¡¨ç¾ãç¯å²ã®çµç«¯ã¨ãã¦ä½¿ç¨å¯è½ - ã§ãã - - ç¯å²æå®ã§ã¯ãASCII ç §åå¦çãè¡ãã¾ããç¯å²ã§ã¯ã[\000-\037] - ã®ããã«æ°å¤çã«æå®ããæåã使ç¨å¯è½ã§ããæåãå«ãç¯å²ã - 大æåå°æåãåºå¥ããªãããããè¨å®ããã¦ããã¨ãã«ä½¿ç¨ããã - å ´åã大æåå°æåã®ä¸¡æ¹ã«ããããã¾ããä¾ãã°ã[W-c] ã¯ã - [][\^_`wxyzabc] ã«ç価ã§ããã大æåå°æåã«é¢ä¿ãªããããã - ã¾ããæåãã¼ãã«ã§ "fr" ãã±ã¼ã«ã使ç¨ãã¦ããå ´åã - [\xc8-\xcb] ã¯ã大æåå°æåã®åºå¥ç¡ãã¢ã¯ã»ã³ãä»ãã® E ã« - ããããã¾ãã - - æåå \d, \D, \s, \S, \w, \W ã¯æåã¯ã©ã¹ã®ä¸ã§ãæå®å¯è½ - ã§ãããã¯ã©ã¹ã«ãããããæåã追å ãã¾ããä¾ãã°ã[\dABCDEF] - ã¯ã16鲿°ã«ããããã¾ãããããè¨å·ã¯å¤§æåã¨çµã¿åãã㦠- å°æåã«ãããã³ã°??ããç¯å²ã®çãæåéåãç°¡ä¾¿ã«æå®ãã - ãã¨ãã§ãã¾ãã - ä¾ãã°ãã¯ã©ã¹ [^\W_] ã¯æåã¾ãã¯æ°åã«ããããã¾ãããã¢ã³ã - ã¼ã¹ã³ã¢ã«ã¯ããããã¾ããã - - \, -, (å§ç«¯ã®)^ 以å¤ã®å ¨ã¦ã®è±æ°åã§ãªãæåããã³çµç«¯ã® ] ã¯ã - æåã¯ã©ã¹ã«ããã¦ç¹å¥ã§ãªãæåã§ãããã¨ã¹ã±ã¼ãããå ´åã§ã - æªå½±é¿ã¯ããã¾ããã + ããã"W46]"ã¾ã㯠"-46]" ã«ããããã¾ããããããç¯å²ã®çµç«¯ + ã¨ãã¦è§£éããã "]" ãããã¯ã¹ã©ãã·ã¥ã§ã¨ã¹ã±ã¼ãããå ´åã + [W-\]46] ã¯ç¯å²ã®å¾ã«2ã¤ã®æåãç¶ãä¸ã¤ã®ã¯ã©ã¹ã¨ãã¦è§£éã + ãã¾ãã"]" ã®8é²ãããã¯16é²è¡¨ç¾ãç¯å²ã®çµç«¯ã¨ãã¦ä½¿ç¨å¯è½ + ã§ãã + + ç¯å²æå®ã§ã¯ãASCII ç §åå¦çãè¡ãã¾ããç¯å²ã§ã¯ã[\000-\037] + ã®ããã«æ°å¤çã«æå®ããæåã使ç¨å¯è½ã§ããæåãå«ãç¯å²ã + 大æåå°æåãåºå¥ããªãããããè¨å®ããã¦ããã¨ãã«ä½¿ç¨ããã + å ´åã大æåå°æåã®ä¸¡æ¹ã«ããããã¾ããä¾ãã°ã[W-c] ã¯ã + [][\^_`wxyzabc] ã«ç価ã§ããã大æåå°æåã«é¢ä¿ãªããããã + ã¾ããæåãã¼ãã«ã§ "fr" ãã±ã¼ã«ã使ç¨ãã¦ããå ´åã + [\xc8-\xcb] ã¯ã大æåå°æåã®åºå¥ç¡ãã¢ã¯ã»ã³ãä»ãã® E ã« + ããããã¾ãã + + æåå \d, \D, \s, \S, \w, \W ã¯æåã¯ã©ã¹ã®ä¸ã§ãæå®å¯è½ + ã§ãããã¯ã©ã¹ã«ãããããæåã追å ãã¾ããä¾ãã°ã[\dABCDEF] + ã¯ã16鲿°ã«ããããã¾ãããããè¨å·ã¯å¤§æåã¨çµã¿åãã㦠+ å°æåã«ãããã³ã°??ããç¯å²ã®çãæåéåãç°¡ä¾¿ã«æå®ãã + ãã¨ãã§ãã¾ãã + ä¾ãã°ãã¯ã©ã¹ [^\W_] ã¯æåã¾ãã¯æ°åã«ããããã¾ãããã¢ã³ã + ã¼ã¹ã³ã¢ã«ã¯ããããã¾ããã + + \, -, (å§ç«¯ã®)^ 以å¤ã®å ¨ã¦ã®è±æ°åã§ãªãæåããã³çµç«¯ã® ] ã¯ã + æåã¯ã©ã¹ã«ããã¦ç¹å¥ã§ãªãæåã§ãããã¨ã¹ã±ã¼ãããå ´åã§ã + æªå½±é¿ã¯ããã¾ããã </literallayout> </refsect2> + <refsect2 id="regexp.reference.verticalbar"> <title>åç´ãã¼</title> <literallayout> - åç´ãã¼æåã¯ã鏿è¢ãæå®ãããã¿ã¼ã³ã§ä½¿ç¨ããã¾ããä¾ãã°ããã¿ã¼ã³ + åç´ãã¼æåã¯ã鏿è¢ãæå®ãããã¿ã¼ã³ã§ä½¿ç¨ããã¾ããä¾ãã°ããã¿ã¼ã³ gilbert|sullivan - ã¯ã"gilbert" ã¾ã㯠"sullivan" ã«ããããã¾ãã鏿è¢ã®æ°ã« - å¶éã¯ããã¾ãããã¾ãã鏿è¢ã空ã¨ãããã¨ãå¯è½ã§ã - (ç©ºã®æååã«ããããã¾ã)ããããã®éç¨ã¯ãå鏿è¢ãå·¦ãã - å³ã«éã«è¡ããæåã«æåãããã®ã使ç¨ããã¾ãã鏿è¢ã(ä»¥ä¸ - ã§èª¬æãã)ãµããã¿ã¼ã³ã®ä¸ã«ããå ´åã"æåãã"ã¨ãããã¨ã¯ - ãµããã¿ã¼ã³ã®é¸æè¢ã¨åæ§ã«ã¡ã¤ã³ãã¿ã¼ã³ã®æ®ãã®é¨åãããã - ããã¨ãããã¨ãæ?Wã¾ãã + ã¯ã"gilbert" ã¾ã㯠"sullivan" ã«ããããã¾ãã鏿è¢ã®æ°ã« + å¶éã¯ããã¾ãããã¾ãã鏿è¢ã空ã¨ãããã¨ãå¯è½ã§ã + (ç©ºã®æååã«ããããã¾ã)ããããã®éç¨ã¯ãå鏿è¢ãå·¦ãã + å³ã«éã«è¡ããæåã«æåãããã®ã使ç¨ããã¾ãã鏿è¢ã(ä»¥ä¸ + ã§èª¬æãã)ãµããã¿ã¼ã³ã®ä¸ã«ããå ´åã"æåãã"ã¨ãããã¨ã¯ + ãµããã¿ã¼ã³ã®é¸æè¢ã¨åæ§ã«ã¡ã¤ã³ãã¿ã¼ã³ã®æ®ãã®é¨åãããã + ããã¨ãããã¨ãæ?Wã¾ãã </literallayout> </refsect2> @@ -1312,103 +1778,113 @@ <title>å é¨ãªãã·ã§ã³è¨å®</title> <literallayout> - PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, PCRE_EXTENDED ã® - è¨å®ã¯ã"(?" ããã³ ")" ã§æ¬ã£ã Perl ãªãã·ã§ã³æåã«ãã - ãã¿ã¼ã³å é¨ã§å¤æ´å¯è½ã§ãã - - i PCRE_CASELESS ãæå® - m PCRE_MULTILINE ãæå® - s PCRE_DOTALL ãæå® - x PCRE_EXTENDED ãæå® - - ä¾ãã°ã(?im) ã¯å¤§æåå°æåãåºå¥ããªããè¤æ°è¡ãããã³ã°ã - æå®ãã¾ãããã¤ãã³æåãåã«ã¤ãããã¨ã«ãããã®ãªãã·ã§ã³ - ãè§£é¤ãããã¨ãå¯è½ã§ãã(?im-sx) ã®ããã«è¨å®ã¨è§£é¤ãçµã¿å - ããããã¨ãå¯è½ã§ãããã®å ´åã¯ãPCRE_CASELESS ããã³ - PCRE_MULTILINE ãè¨å®ãããPCRE_DOTALL ããã³ PCRE_EXTENDED - ãè§£é¤ããã¾ããããæåããã¤ãã³ã®åã«ãå¾ã«ãæå®ããã - å ´åããã®ãªãã·ã§ã³ã¯è§£é¤ããã¾ãã - - ãªãã·ã§ã³å¤æ´ã®é©ç¨ç¯å²ã¯è¨å®ãè¡ããããã¿ã¼ã³ã®å ´æã«ä¾å - ãã¾ãããµããã¿ã¼ã³ã®å¤å´ã§è¨å®ãããå ´åããã®å¹æã¯ããªã - ã·ã§ã³ã®è¨å®ãããã¯è§£é¤ããããã³ã°ã®æåã§è¡ãããã®ã¨åã - ã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ã¯ãå ¨ã¦å ¨ãåæ§ã«åä½ãã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_CASELESS</link> , + <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link> , + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link> , + <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ã® + è¨å®ã¯ã"(?" ããã³ ")" ã§æ¬ã£ã Perl ãªãã·ã§ã³æåã«ãã + ãã¿ã¼ã³å é¨ã§å¤æ´å¯è½ã§ãã + + i <link linkend="pcre.pattern.modifiers">PCRE_CASELESS</link>ãæå® + m <link linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãæå® + s <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãæå® + x <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ãæå® + + ä¾ãã°ã(?im) ã¯å¤§æåå°æåãåºå¥ããªããè¤æ°è¡ãããã³ã°ã + æå®ãã¾ãããã¤ãã³æåãåã«ã¤ãããã¨ã«ãããã®ãªãã·ã§ã³ + ãè§£é¤ãããã¨ãå¯è½ã§ãã(?im-sx) ã®ããã«è¨å®ã¨è§£é¤ãçµã¿å + ããããã¨ãå¯è½ã§ãããã®å ´åã¯ã<link + linkend="pcre.pattern.modifiers">PCRE_CASELESS</link>ããã³<link + linkend="pcre.pattern.modifiers">PCRE_MULTILINE</link>ãè¨å®ããã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ããã³ + <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link> + ãè§£é¤ããã¾ããããæåããã¤ãã³ã®åã«ãå¾ã«ãæå®ããã + å ´åããã®ãªãã·ã§ã³ã¯è§£é¤ããã¾ãã + + ãªãã·ã§ã³å¤æ´ã®é©ç¨ç¯å²ã¯è¨å®ãè¡ããããã¿ã¼ã³ã®å ´æã«ä¾å + ãã¾ãããµããã¿ã¼ã³ã®å¤å´ã§è¨å®ãããå ´åããã®å¹æã¯ããªã + ã·ã§ã³ã®è¨å®ãããã¯è§£é¤ããããã³ã°ã®æåã§è¡ãããã®ã¨åã + ã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ã¯ãå ¨ã¦å ¨ãåæ§ã«åä½ãã¾ãã (?i)abc a(?i)bc ab(?i)c abc(?i) - ã¯ã³ã³ãã¤ã«å¾ã®ãã¿ã¼ã³ã¨ãã¦ã¯ããã¿ã¼ã³ abc ã« PCRE_CASELESS - ãè¨å®ãããã®ã¨ãªãåãã«ãªãã¾ããè¨ããããã¨ããã®ãã㪠- "æä¸ä½ã®"è¨å®ã¯ã(ãµããã¿ã¼ã³å é¨ã§ä»ã®å¤æ´ãè¡ããªãéã) - ãã¿ã¼ã³å ¨ä½ã«é©ç¨ããã¾ããæä¸ä½ã¨åãè¨å®ãè¤æ°åè¡ãã㦠- ããå ´åãæãå³å´ã®è¨å®ã使ç¨ããã¾ãã - - ãµããã¿ã¼ã³ã®å é¨ã§ãªãã·ã§ã³ã®å¤æ´ãè¡ãããå ´åãå¹æã¯ - ç°ãªãã¾ãããã®åä½ã®å¤æ´ã¯ãPerl 5.005 ã§è¡ããã¾ããã - ãµããã¿ã¼ã³å ã®ãªãã·ã§ã³å¤æ´ã¯ããããæå®ãããµããã¿ã¼ - ã³ã®ãã®é¨åã«ã®ã¿å½±é¿ãã¾ãããã®ããã + ã¯ã³ã³ãã¤ã«å¾ã®ãã¿ã¼ã³ã¨ãã¦ã¯ããã¿ã¼ã³ abc ã« + <link linkend="pcre.pattern.modifiers">PCRE_CASELESS</link> + ãè¨å®ãããã®ã¨ãªãåãã«ãªãã¾ããè¨ããããã¨ããã®ãã㪠+ "æä¸ä½ã®"è¨å®ã¯ã(ãµããã¿ã¼ã³å é¨ã§ä»ã®å¤æ´ãè¡ããªãéã) + ãã¿ã¼ã³å ¨ä½ã«é©ç¨ããã¾ããæä¸ä½ã¨åãè¨å®ãè¤æ°åè¡ãã㦠+ ããå ´åãæãå³å´ã®è¨å®ã使ç¨ããã¾ãã + + ãµããã¿ã¼ã³ã®å é¨ã§ãªãã·ã§ã³ã®å¤æ´ãè¡ãããå ´åãå¹æã¯ + ç°ãªãã¾ãããã®åä½ã®å¤æ´ã¯ãPerl 5.005 ã§è¡ããã¾ããã + ãµããã¿ã¼ã³å ã®ãªãã·ã§ã³å¤æ´ã¯ããããæå®ãããµããã¿ã¼ + ã³ã®ãã®é¨åã«ã®ã¿å½±é¿ãã¾ãããã®ããã (a(?i)b)c - ã¯ãabc ããã³ aBc ã«ããããã(PCRE_CASELESS ã使ç¨ãã㦠- ããªãã¨ä»®å®ããå ´åã)ä»ã®æååã«ã¯ããããã¾ããã - ãã®ããã«ããªãã·ã§ã³ã¯ããã¿ã¼ã³ã®åå ´æã«ç°ãªã£ãè¨å®ãè¡ã - ãã¨ãå¯è½ã§ãããã鏿è¢ã«å¾¡ããªãã夿´ã¯å ¨ã¦ãåããµãã - ã¿ã¼ã³å ã®å¾ã«ç¶ãæã«æ³¢åãã¾ããä¾ãã°ã + ã¯ãabc ããã³ aBc ã«ããããã(<link + linkend="pcre.pattern.modifiers">PCRE_CASELESS</link>ã使ç¨ãã + ã¦ããªãã¨ä»®å®ããå ´åã)ä»ã®æååã«ã¯ããããã¾ããã + ãã®ããã«ããªãã·ã§ã³ã¯ããã¿ã¼ã³ã®åå ´æã«ç°ãªã£ãè¨å®ãè¡ã + ãã¨ãå¯è½ã§ãããã鏿è¢ã«å¾¡ããªãã夿´ã¯å ¨ã¦ãåããµãã + ã¿ã¼ã³å ã®å¾ã«ç¶ãæã«æ³¢åãã¾ããä¾ãã°ã (a(?i)b|c) - ã¯ã"C" ã«ãããããéã«æåã®æããªãã·ã§ã³è¨å®åã«ç ´æ£ - ããã¦ããã«ããããããã"ab", "aB", "c", "C" ã«ããããã¾ãã - ããã¯ããªãã·ã§ã³è¨å®ã®å¹æãã³ã³ãã¤ã«æã«çãããã¨ã«ãã - ã¾ããããã§ãªãã¨ãé常ã«å¥å¦ãªãã¨ãçãããã¨ã«ãªãã¾ãã - - PCRE ç¹æã®ãªãã·ã§ã³ãPCRE_UNGREEDY ããã³ PCRE_EXTRA - ã¯ããããæå U ããã³ X ã使ç¨ãããã¨ã«ãããPerl äºæã® - ãªãã·ã§ã³ã¨åæ§ã«å¤æ´ãããã¨ãå¯è½ã§ãã - (?X) ãã©ã°ã®è¨å®ã¯ç¹å¥ã§ãæä¸ä½ã®å ´åã§ãã常ã«ãã¿ã¼ã³ - å ã§ä»ã®è¨å®ããªã³ã«ããåã«æå®ããå¿ è¦ãããã¾ãã - ãã®ãã©ã°ã¯ãæåã«æå®ããã®ãæåã§ãã - + ã¯ã"C" ã«ãããããéã«æåã®æããªãã·ã§ã³è¨å®åã«ç ´æ£ + ããã¦ããã«ããããããã"ab", "aB", "c", "C" ã«ããããã¾ãã + ããã¯ããªãã·ã§ã³è¨å®ã®å¹æãã³ã³ãã¤ã«æã«çãããã¨ã«ãã + ã¾ããããã§ãªãã¨ãé常ã«å¥å¦ãªãã¨ãçãããã¨ã«ãªãã¾ãã + + PCRE ç¹æã®ãªãã·ã§ã³ã<link + linkend="pcre.pattern.modifiers">PCRE_UNGREEDY</link>ããã³<link + linkend="pcre.pattern.modifiers">PCRE_EXTRA</link>ã¯ããããæå + U ããã³ X ã使ç¨ãããã¨ã«ãããPerl äºæã®ãªãã·ã§ã³ã¨åæ§ã«å¤ + æ´ãããã¨ãå¯è½ã§ãã + (?X) ãã©ã°ã®è¨å®ã¯ç¹å¥ã§ãæä¸ä½ã®å ´åã§ãã常ã«ãã¿ã¼ã³ + å ã§ä»ã®è¨å®ããªã³ã«ããåã«æå®ããå¿ è¦ãããã¾ãã + ãã®ãã©ã°ã¯ãæåã«æå®ããã®ãæåã§ãã </literallayout> </refsect2> + <refsect2 id="regexp.reference.subpatterns"> <title>ãµããã¿ã¼ã³</title> <literallayout> - ãµããã¿ã¼ã³ã¯æ¬å¼§(丸æ¬å¼§)ã§åºåããããã¹ããå¯è½ã§ãã - ãã¿ã¼ã³ã®ä¸é¨ããµããã¿ã¼ã³ã¨ãã¦æå®ããããã«ã¯ã2ã¤ã®ã - ã¨ãè¡ãã¾ãã + ãµããã¿ã¼ã³ã¯æ¬å¼§(丸æ¬å¼§)ã§åºåããããã¹ããå¯è½ã§ãã + ãã¿ã¼ã³ã®ä¸é¨ããµããã¿ã¼ã³ã¨ãã¦æå®ããããã«ã¯ã2ã¤ã®ã + ã¨ãè¡ãã¾ãã - 1. 鏿è¢ã®éåããã¼ã«ã«åãã¾ããä¾ãã°ããã¿ã¼ã³ + 1. 鏿è¢ã®éåããã¼ã«ã«åãã¾ããä¾ãã°ããã¿ã¼ã³ cat(aract|erpillar|) - ã¯ãåèª "cat", "cataract", "caterpillar" ã«ããããã¾ãã - æ¬å¼§ãã¤ããªãã¨ããã®ãã¿ã¼ã³ã¯ã"cataract", - "erpillar" ã¾ãã¯ç©ºã®æååã«ããããã¦ãã¾ãã¾ãã - - 2. æ¬å¼§ã¯ããµããã¿ã¼ã³ã(以ä¸ã§å®ç¾©ãã)å¤ãåå¾ãããµããã¿ã¼ã³ - ã¨ãã¦è¨å®ãã¾ãããã¿ã¼ã³å ¨ä½ãããããããµããã¿ã¼ã³ã«ããã - ãã対象æååã®ä¸é¨ã¯ã - <function>pcre_exec</function> ã® <emphasis>ovector</emphasis> - 弿°ã«ããã³ã¼ã«ããå´ã«è¿ããã¾ããå¤ãåå¾ãããµããã¿ã¼ã³ã® - çªå·ãå¾ãããã«æ¬å¼§ã®å§ã¾ãã¯(1ããå§ã¾ã£ã¦)å·¦ããå³ã«æ°ãããã¾ãã - - ä¾ãã°ãæåå "the red king" ãæ¬¡ã®ãã¿ã¼ã³ã«ããããããå ´åã + ã¯ãåèª "cat", "cataract", "caterpillar" ã«ããããã¾ãã + æ¬å¼§ãã¤ããªãã¨ããã®ãã¿ã¼ã³ã¯ã"cataract", + "erpillar" ã¾ãã¯ç©ºã®æååã«ããããã¦ãã¾ãã¾ãã + + 2. æ¬å¼§ã¯ããµããã¿ã¼ã³ã(以ä¸ã§å®ç¾©ãã)å¤ãåå¾ãããµããã¿ã¼ã³ + ã¨ãã¦è¨å®ãã¾ãããã¿ã¼ã³å ¨ä½ãããããããµããã¿ã¼ã³ã«ããã + ãã対象æååã®ä¸é¨ã¯ã + <function>pcre_exec</function> ã® <emphasis>ovector</emphasis> + 弿°ã«ããã³ã¼ã«ããå´ã«è¿ããã¾ããå¤ãåå¾ãããµããã¿ã¼ã³ã® + çªå·ãå¾ãããã«æ¬å¼§ã®å§ã¾ãã¯(1ããå§ã¾ã£ã¦)å·¦ããå³ã«æ°ãããã¾ãã + + ä¾ãã°ãæåå "the red king" ãæ¬¡ã®ãã¿ã¼ã³ã«ããããããå ´åã the ((red|white) (king|queen)) - åå¾ãããé¨åæååã¯ã "red king", "red", "king" ã§ããã - ãããã 1, 2, 3 çªã¨ãªãã¾ãã + åå¾ãããé¨åæååã¯ã "red king", "red", "king" ã§ããã + ãããã 1, 2, 3 çªã¨ãªãã¾ãã - æ¬å¼§ã2ã¤ã®æ©è½ãæãã¦ããã¨ããäºå®ã常ã«è¯ãæ¹ã«åãããã§ - ã¯ããã¾ãããå¤ãåå¾ããå¿ è¦ã¯ãªããããµããã¿ã¼ã³ãè¤æ°ç¨ - ãããã¨ãå¿ è¦ã§ããå ´åãå°ãªãããã¾ãããå·¦æ¬å¼§ã®å¾ã« "?:" - ãä»ããå ´åããã®ãµããã¿ã¼ã³ã¯å¤ã®åå¾ãè¡ãããå¤ãåå¾ãã - ãµããã¿ã¼ã³ã®çªå·ãè¨ç®ããéã«ãå ç®ããã¾ãããä¾ãã°ãæåå - "the white queen" ã¯æ¬¡ã®ãã¿ã¼ã³ããããããã¦ã¿ã¾ãããã + æ¬å¼§ã2ã¤ã®æ©è½ãæãã¦ããã¨ããäºå®ã常ã«è¯ãæ¹ã«åãããã§ + ã¯ããã¾ãããå¤ãåå¾ããå¿ è¦ã¯ãªããããµããã¿ã¼ã³ãè¤æ°ç¨ + ãããã¨ãå¿ è¦ã§ããå ´åãå°ãªãããã¾ãããå·¦æ¬å¼§ã®å¾ã« "?:" + ãä»ããå ´åããã®ãµããã¿ã¼ã³ã¯å¤ã®åå¾ãè¡ãããå¤ãåå¾ãã + ãµããã¿ã¼ã³ã®çªå·ãè¨ç®ããéã«ãå ç®ããã¾ãããä¾ãã°ãæåå + "the white queen" ã¯æ¬¡ã®ãã¿ã¼ã³ããããããã¦ã¿ã¾ãããã the ((?:red|white) (king|queen)) @@ -1515,17 +1991,18 @@ ã¯Cã³ã¡ã³ãã«æ£ããããããã¾ããæ§ã ãªå復æå®åã®æå³ã¯ã ä»ã«ã¯å¤åããã好ã¾ãããããã®æ°ã ãã夿´ããã¾ãã - ãã®çå符ã®ä½¿ç¨æ³ãå復æå®åããã®?kããå ´åã®ä½¿ç¨æ³ã¨ - ãããªã©ã³ããªãããã«ã£fä¸ããã2稩^ã®ä½¿ç¨æ³ãããã®ã§ã - æã ãæ¬¡ã®ããã«2éã«ä½¿ç¨ããããã¨ãããã¾ãã + ãã®çå符ã®ä½¿ç¨æ³ãå復æå®åããã®å³ã«ããå ´åã®ä½¿ç¨æ³ã¨æ··ä¹±ã + ãªãã§ä¸ããããã®ããã«2種é¡ã®ä½¿ç¨æ³ããããããæã ãæ¬¡ã®ããã« + 2éã«ä½¿ç¨ããããã¨ãããã¾ãã \d??\d 鏿ã«ãã1æ¡ã®æ°åã«ããããã¾ããããã¿ã¼ã³ã®æ®ããããã ããå¯ä¸ã®æ¹æ³ã§ããå ´åã«ã¯ã2æ¡ã®æ°å¤ã«ããããããã¨ãå¯è½ã§ãã - PCRE_UNGREEDY ãªãã·ã§ã³ãè¨å®ãããå ´å(Perl ã§ã¯ãã®ãªãã·ã§ã³ - ã¯ä½¿ç¨ã§ãã¾ãã)ãå復æå®åã¯ããã©ã«ãã§ã¯è²ªæ¬²ã§ã¯ããã¾ããã + <link linkend="pcre.pattern.modifiers">PCRE_UNGREEDY</link>ãªãã·ã§ + ã³ãè¨å®ãããå ´å(Perl ã§ã¯ãã®ãªãã·ã§ã³ã¯ä½¿ç¨ã§ãã¾ãã)ãå復 + æå®åã¯ããã©ã«ãã§ã¯è²ªæ¬²ã§ã¯ããã¾ããã ãããããã®å復æå®åã¯ãå¾ãã«çå符ãã¤ãããã¨ã«ãã貪欲 ã«ãããã¨ãå¯è½ã§ããè¨ããããã¨ãçå符ã¯ãããã©ã«ãã®åä½ ãé転ãã¾ãã @@ -1535,8 +2012,9 @@ ã¾ãã¯æå°ã®å¤§ããã«å¿ãã¦ããå¤ãã®ä¿åé åãå¿ è¦ã¨ãªãã¾ãã ãã¿ã¼ã³ãã.* ã¾ã㯠.(0,) ã§å§ã¾ãã(Perl ã§ç価ãªãã®ã¯ /s) - PCRE_DOTALL ãªãã·ã§ã³ãè¨å®ããã¦ããå ´åã. ã¯æ¹è¡ã«ããã - ã§ããããã«ãªããã?Ã¼Ã³ã¯æé»ã®ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãªãã·ã§ + ã³ãè¨å®ããã¦ããå ´åã. ã¯æ¹è¡ã«ãããã§ããããã«ãªããæé»ã® + ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã ããã¯ãå¾ãã«ç¶ããã®ã«ãããã対象æååã®åæåã®ä½ç½®ã« 対ãã¦è©¦è¡ãããããã§ãããã®ãããæåã«ãããããå¾ã§ ã©ããã®ä½ç½®ã§å ¨ä½ã®ããããåã³è¡ããã¨ã¯ã§ãã¾ããã @@ -1544,7 +2022,9 @@ PCRE ã¯ãã®ãããªãã¿ã¼ã³ã \A ãåã«ãããã®ã¨ãã¦å¦çãã¾ãã 対象æååãæ¹è¡ãå«ã¾ãªããã¨ãæ¢ç¥ã®å ´åã ãã¿ã¼ã³ã .* ã§å§ã¾ãå ´åã®æé©åã®ããã«ããã㯠^ ãç¨ã㦠- ã¢ã³ã«ã¼ãé½ã«ç¤ºãããã«PCRE_DOTALL ãè¨å®ãã価å¤ãããã¾ãã + ã¢ã³ã«ã¼ãé½ã«ç¤ºãããã«<link + linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãè¨å®ããä¾¡å¤ + ãããã¾ãã å¤ãåå¾ãããµããã¿ã¼ã³ãç¹°ãè¿ãããæãåå¾ãããå¤ã¯ã æå¾ã®ç¹°ãè¿ãã§ãããããé¨åæååã§ããä¾ãã°ã @@ -1567,194 +2047,193 @@ <refsect2 id="regexp.reference.back_references"> <title>徿¹åç §</title> <literallayout> - æåã¯ã©ã¹ã®å¤ã§ãããã¯ã¹ã©ãã·ã¥ã®å¾ã« 0 ãã大ããæ°åã - ä»ãããã®ã¯ãã¿ã¼ã³ã§ä»¥åã«(ããªãã¡å·¦ã«ãã)å¤ãåå¾ãã - ãµããã¿ã¼ã³ã«å¯¾ãã徿¹åç §ã§ãããåã«ããå¤ã®åå¾ãè¡ã - å·¦æ¬å¼§ã®æ°ã¾ã§ä½¿ç¨å¯è½ã§ãã - - ããããããã¯ã¹ã©ãã·ã¥ã®å¾ã«ç¶ã10鲿°ã10æªæºã®å ´åã¯å¸¸ã« - 徿¹åç §ã¨ãã¦è§£éããããã¿ã¼ã³å ¨ä½ã®å¤ãåå¾ããå·¦æ¬å¼§ã®æ° - ã«æºããªãå ´åã«ã®ã¿ã¨ã©ã¼ã¨ãªãã¾ãã - è¨ããããã¨ãåç §ãããæ¬å¼§ã¯10æªæºã®æ°ã«ã¤ãã¦ã¯åç §ããå´ - ã®å·¦ã«ããå¿ è¦ããªãã¨ãããã¨ã§ãã - ããã¯ã¹ã©ãã·ã¥ã®å¾ã«æ°åãç¶ãå ´åã®å¦çã®è©³ç´°ã«ã¤ãã¦ã¯ã - ä¸è¨ã® "ããã¯ã¹ã©ãã·ã¥"ã¨ããé¡ã®ç¯ãåç §ä¸ããã - - 徿¹åç §ã¯ããµããã¿ã¼ã³èªä½ãããããããã®ãããããã - ç¾å¨ã®å¯¾è±¡æååã«ãããå¤ãåå¾ãããã¿ã¼ã³ãå®éã«ãããã - ããã®ã«ããããã¾ãããã®ããããã¿ã¼ã³ - + æåã¯ã©ã¹ã®å¤ã§ãããã¯ã¹ã©ãã·ã¥ã®å¾ã« 0 ãã大ããæ°åã + ä»ãããã®ã¯ãã¿ã¼ã³ã§ä»¥åã«(ããªãã¡å·¦ã«ãã)å¤ãåå¾ãã + ãµããã¿ã¼ã³ã«å¯¾ãã徿¹åç §ã§ãããåã«ããå¤ã®åå¾ãè¡ã + å·¦æ¬å¼§ã®æ°ã¾ã§ä½¿ç¨å¯è½ã§ãã + + ããããããã¯ã¹ã©ãã·ã¥ã®å¾ã«ç¶ã10鲿°ã10æªæºã®å ´åã¯å¸¸ã« + 徿¹åç §ã¨ãã¦è§£éããããã¿ã¼ã³å ¨ä½ã®å¤ãåå¾ããå·¦æ¬å¼§ã®æ° + ã«æºããªãå ´åã«ã®ã¿ã¨ã©ã¼ã¨ãªãã¾ãã + è¨ããããã¨ãåç §ãããæ¬å¼§ã¯10æªæºã®æ°ã«ã¤ãã¦ã¯åç §ããå´ + ã®å·¦ã«ããå¿ è¦ããªãã¨ãããã¨ã§ãã + ããã¯ã¹ã©ãã·ã¥ã®å¾ã«æ°åãç¶ãå ´åã®å¦çã®è©³ç´°ã«ã¤ãã¦ã¯ã + ä¸è¨ã® "ããã¯ã¹ã©ãã·ã¥"ã¨ããé¡ã®ç¯ãåç §ä¸ããã + + 徿¹åç §ã¯ããµããã¿ã¼ã³èªä½ãããããããã®ãããããã + ç¾å¨ã®å¯¾è±¡æååã«ãããå¤ãåå¾ãããã¿ã¼ã³ãå®éã«ãããã + ããã®ã«ããããã¾ãããã®ããããã¿ã¼ã³ + (sens|respons)e and \1ibility - ã¯ã"sense and sensibility" ããã³ "response and responsi- - bility" ã«ããããã¾ããã"sense and responsibility" ã«ã¯ - ããããã¾ããã徿¹åç §ã®æç¹ã§ã大æåå°æåãåºå¥ããããã - ãæå¹ã®å ´åãæåã®å¤§æåå°æåãé¢ä¿ãã¾ããä¾ãã°ã - + ã¯ã"sense and sensibility" ããã³ "response and responsi- + bility" ã«ããããã¾ããã"sense and responsibility" ã«ã¯ + ããããã¾ããã徿¹åç §ã®æç¹ã§ã大æåå°æåãåºå¥ããããã + ãæå¹ã®å ´åãæåã®å¤§æåå°æåãé¢ä¿ãã¾ããä¾ãã°ã + ((?i)rah)\s+\1 - - ã¯ã"rah rah" ããã³ "RAH RAH" ã«ããããã¾ããã - å ã®åå¾ãããµããã¿ã¼ã³ã¯å¤§æåå°æåãåºå¥ããããããã¦ã - ãã«ããããããã"RAH rah" ã«ã¯ããããã¾ããã - - åããµããã¿ã¼ã³ã«è¤æ°åã®å¾æ¹åç §ãè¡Fãã¨ãã§ãã¾ãããã - ãµããã¿ã¼ã³ãç¹å®ã®ãããã§å®éã«ã¯ä½¿ç¨ããã¦ããªãå ´åã - 徿¹åç §ã¯å¸¸ã«å¤±æãã¾ããä¾ãã°ããã¿ã¼ã³ - + + ã¯ã"rah rah" ããã³ "RAH RAH" ã«ããããã¾ããã + å ã®åå¾ãããµããã¿ã¼ã³ã¯å¤§æåå°æåãåºå¥ããããããã¦ã + ãã«ããããããã"RAH rah" ã«ã¯ããããã¾ããã + + åããµããã¿ã¼ã³ã«è¤æ°åã®å¾æ¹åç §ãè¡Fãã¨ãã§ãã¾ãããã + ãµããã¿ã¼ã³ãç¹å®ã®ãããã§å®éã«ã¯ä½¿ç¨ããã¦ããªãå ´åã + 徿¹åç §ã¯å¸¸ã«å¤±æãã¾ããä¾ãã°ããã¿ã¼ã³ + (a|(bc))\2 - ã¯ã"bc" ã§ã¯ãªã "a" ã«æåã«ãããããå ´åã«å¸¸ã«å¤±æãã¾ãã - æå¤§ 99 åã®å¾æ¹åç §ã使ç¨ã§ãããããããã¯ã¹ã©ãã·ã¥ã®å¾ã« - æ°åãç¶ããã®ã¯å ¨ã¦å¾æ¹åç §çªå·ã®å¯è½æ§ãããéåã¨ãã¦è§£é - ããã¾ãã - ãã¿ã¼ã³ã®å¾ã«æ°åãç¶ãå ´åã徿¹åç §ãçµäºããããã« - ãªãããã®åºåãæåãç½®ãå¿ è¦ãããã¾ãã - PCRE_EXTENDED ãªãã·ã§ã³ãè¨å®ãã¦ããå ´åã空ç½ãåºåãæå - ã¨ãããã¨ãã§ãã¾ãããã®ä»ã®å ´åã¯ç©ºã®ã³ã¡ã³ãã使ç¨ã§ãã¾ãã - - åç §ããæ¬å¼§ã®ä¸ã«ãã徿¹åç §ã¯ããµããã¿ã¼ã³ãæåã«ä½¿ç¨ã - ãéã«å¤±æãã¾ãããã®ããã(a\1) ã¯ä½ã«ãããããã¾ããã - ãããããã®ãããªåç §ã¯ãè¤æ°å使ç¨ãããµããã¿ã¼ã³ã®å é¨ã§ - æç¨ã§ããä¾ãã°ã次ã®ãã¿ã¼ã³ - + ã¯ã"bc" ã§ã¯ãªã "a" ã«æåã«ãããããå ´åã«å¸¸ã«å¤±æãã¾ãã + æå¤§ 99 åã®å¾æ¹åç §ã使ç¨ã§ãããããããã¯ã¹ã©ãã·ã¥ã®å¾ã« + æ°åãç¶ããã®ã¯å ¨ã¦å¾æ¹åç §çªå·ã®å¯è½æ§ãããéåã¨ãã¦è§£é + ããã¾ãã + ãã¿ã¼ã³ã®å¾ã«æ°åãç¶ãå ´åã徿¹åç §ãçµäºããããã« + ãªãããã®åºåãæåãç½®ãå¿ è¦ãããã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ãªã + ã·ã§ã³ãè¨å®ãã¦ããå ´åã空ç½ãåºåãæåã¨ãããã¨ãã§ãã¾ãã + ãã®ä»ã®å ´åã¯ç©ºã®ã³ã¡ã³ãã使ç¨ã§ãã¾ãã + + åç §ããæ¬å¼§ã®ä¸ã«ãã徿¹åç §ã¯ããµããã¿ã¼ã³ãæåã«ä½¿ç¨ã + ãéã«å¤±æãã¾ãããã®ããã(a\1) ã¯ä½ã«ãããããã¾ããã + ãããããã®ãããªåç §ã¯ãè¤æ°å使ç¨ãããµããã¿ã¼ã³ã®å é¨ã§ + æç¨ã§ããä¾ãã°ã次ã®ãã¿ã¼ã³ + (a|b\1)+ - ã¯ã"a" ã®ä¸¦ã³ãããã³ "aba"ã"ababaa" çã«ãããããã¾ãã - ãµããã¿ã¼ã³ã®åå復ã«ããã¦ã徿¹åç §ã¯ãåã®ç¹°ãè¿ãã«å¯¾å¿ - ããæååã«ããããã¾ãããããåä½ãããããã«ãæåã®å復 - æã«å¾æ¹åç §ã«ãããããå¿ è¦ããªããããªãã¿ã¼ã³ã§ããå¿ è¦ã - ããã¾ããããã¯ä¸ã®ä¾ã®ããã«é¸æã使ç¨ããããã¼ããæå°ã¨ - ããå復æå®åã«ããè¡ããã¨ãã§ãã¾ãã - + ã¯ã"a" ã®ä¸¦ã³ãããã³ "aba"ã"ababaa" çã«ãããããã¾ãã + ãµããã¿ã¼ã³ã®åå復ã«ããã¦ã徿¹åç §ã¯ãåã®ç¹°ãè¿ãã«å¯¾å¿ + ããæååã«ããããã¾ãããããåä½ãããããã«ãæåã®å復 + æã«å¾æ¹åç §ã«ãããããå¿ è¦ããªããããªãã¿ã¼ã³ã§ããå¿ è¦ã + ããã¾ããããã¯ä¸ã®ä¾ã®ããã«é¸æã使ç¨ããããã¼ããæå°ã¨ + ããå復æå®åã«ããè¡ããã¨ãã§ãã¾ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.assertions"> <title>è¨æ</title> <literallayout> - è¨æã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã®å¾ã«ç¶ããåã«ããæåã« - 対ãããã¹ãã§ãããå®éã«ã¯æåã¸ã®ä½ç¨ãè¡ãã¾ããã - - \b, \B, \A, \Z, \z, ^, $ ã®ãããªç°¡åãªè¨æã³ã¼ãã以ä¸ã§èª¬ - æãã¾ããããè¤éãªè¨æã¯ããµããã¿ã¼ã³ã¨ãã¦ã³ã¼ãåããã¾ - ãã2種é¡ã®è¨æãããã¾ãã対象æååã«ããã¦ç¾å¨ä½ç½®ã®åã - è¦ããã®ã¨ãå¾ããè¦ããã®ã§ãã - - è¨æãµããã¿ã¼ã³ã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã夿´ãããªã - ãã¨ãé¤ããé常ã¨åãããã«ãããããã¾ããåæ¹ã¸ã®è¨æã¯ã - è¯å®è¨æã®å ´å (?= ã§ãå¦å®è¨æã®å ´å (?! ã§å§ã¾ãã¾ããä¾ãã°ã + è¨æã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã®å¾ã«ç¶ããåã«ããæåã« + 対ãããã¹ãã§ãããå®éã«ã¯æåã¸ã®ä½ç¨ãè¡ãã¾ããã + + \b, \B, \A, \Z, \z, ^, $ ã®ãããªç°¡åãªè¨æã³ã¼ãã以ä¸ã§èª¬ + æãã¾ããããè¤éãªè¨æã¯ããµããã¿ã¼ã³ã¨ãã¦ã³ã¼ãåããã¾ + ãã2種é¡ã®è¨æãããã¾ãã対象æååã«ããã¦ç¾å¨ä½ç½®ã®åã + è¦ããã®ã¨ãå¾ããè¦ããã®ã§ãã + + è¨æãµããã¿ã¼ã³ã¯ãç¾å¨ããããè¡ã£ã¦ããä½ç½®ã夿´ãããªã + ãã¨ãé¤ããé常ã¨åãããã«ãããããã¾ããåæ¹ã¸ã®è¨æã¯ã + è¯å®è¨æã®å ´å (?= ã§ãå¦å®è¨æã®å ´å (?! ã§å§ã¾ãã¾ããä¾ãã°ã \w+(?=;) - ã¯ãã»ãã³ãã³ãå¾ã«ç¶ãåèªã«ããããã¾ãããããããããã® - ã«ã¯ãã»ãã³ãã³ãå«ã¾ãããããã¦ã + ã¯ãã»ãã³ãã³ãå¾ã«ç¶ãåèªã«ããããã¾ãããããããããã® + ã«ã¯ãã»ãã³ãã³ãå«ã¾ãããããã¦ã foo(?!bar) - ã¯ã"bar" ãå¾ãã«ç¶ããªã "foo" ã«ããããã¾ãã - è¦ããã¯ä¼¼ã¦ãããã¿ã¼ã³ã«æ³¨æãã¦ä¸ããã + ã¯ã"bar" ãå¾ãã«ç¶ããªã "foo" ã«ããããã¾ãã + è¦ããã¯ä¼¼ã¦ãããã¿ã¼ã³ã«æ³¨æãã¦ä¸ããã (?!foo)bar - ã¯ã"foo" 以å¤ã®ãã®ãåã«ãã "bar" ã®åå¨ãè¦ã¤ãããã¾ããã - 次ã®3æåã "bar" ã§ããå ´åã«ã(?!foo) ã¯å¸¸ã« &true; ã¨ãªããã - ã«ããã®ãã¿ã¼ã³ã¯ã"bar" ã®åå¨ãè¦ã¤ãããã¨ãã§ããªãã®ã§ãã - ãã®åä½ãå®ç¾ããããã«ã¯ã徿¹è¨æãå¿ è¦ã§ãã - 徿¹è¨æã¯ãè¯å®è¨æã®å ´å (?<= ã§ãå¦å®è¨æã®å ´å (?<! - ã§å§ã¾ãã¾ããä¾ãã°ã + ã¯ã"foo" 以å¤ã®ãã®ãåã«ãã "bar" ã®åå¨ãè¦ã¤ãããã¾ããã + 次ã®3æåã "bar" ã§ããå ´åã«ã(?!foo) ã¯å¸¸ã« &true; ã¨ãªããã + ã«ããã®ãã¿ã¼ã³ã¯ã"bar" ã®åå¨ãè¦ã¤ãããã¨ãã§ããªãã®ã§ãã + ãã®åä½ãå®ç¾ããããã«ã¯ã徿¹è¨æãå¿ è¦ã§ãã + 徿¹è¨æã¯ãè¯å®è¨æã®å ´å (?<= ã§ãå¦å®è¨æã®å ´å (?<! + ã§å§ã¾ãã¾ããä¾ãã°ã (?<!foo)bar - ã¯ã"foo" ãåã«ãªã "bar" ã®åå¨ãè¦ã¤ãã¾ãã徿¹è¨æã®å 容 - ã¯ããããããæååå ¨ä½ãåºå®é·ã§ããå¿ è¦ããããã¨ã«å¶éã - ãã¦ãã¾ããããããè¤æ°ã®é¸æè¢ãããå ´åãå ¨ã¦ã®åãåºå®é· - ã§ããå¿ è¦ã¯ããã¾ãããã¤ã¾ãã + ã¯ã"foo" ãåã«ãªã "bar" ã®åå¨ãè¦ã¤ãã¾ãã徿¹è¨æã®å 容 + ã¯ããããããæååå ¨ä½ãåºå®é·ã§ããå¿ è¦ããããã¨ã«å¶éã + ãã¦ãã¾ããããããè¤æ°ã®é¸æè¢ãããå ´åãå ¨ã¦ã®åãåºå®é· + ã§ããå¿ è¦ã¯ããã¾ãããã¤ã¾ãã (?<=bullock|donkey) - ã¯ä½¿ç¨å¯è½ã§ããã + ã¯ä½¿ç¨å¯è½ã§ããã (?<!dogs?|cats?) - ã¯ã³ã³ãã¤ã«æã«ã¨ã©ã¼ãçãã¾ããç°ãªã£ãé·ãã®æååã«ãã - ãããæã¯ã徿¹è¨æã®æä¸ä½ã§ã®ã¿ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã - å ¨ã¦ã®æã®åãé·ãã®æååã«ãããããå¿ è¦ããã Perl 5.005 - ã«å¯¾ãã¦æ¡å¼µããã¦ãã¾ããæ¬¡ã®ãããªè¨æ - - (?<=ab(c|de)) - - ã¯ãæä¸ä½ã®æã2ã¤ã®ç°ãªã£ãé·ãã«ããããå¾ãããã使ç¨ã§ã - ã¾ãããããããæä¸ä½ã®æã2ã¤ä½¿ç¨ããããã«æ¸ãæããå ´åã¯ã - 使ç¨å¯è½ã§ãã + ã¯ã³ã³ãã¤ã«æã«ã¨ã©ã¼ãçãã¾ããç°ãªã£ãé·ãã®æååã«ãã + ãããæã¯ã徿¹è¨æã®æä¸ä½ã§ã®ã¿ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã + å ¨ã¦ã®æã®åãé·ãã®æååã«ãããããå¿ è¦ããã Perl 5.005 + ã«å¯¾ãã¦æ¡å¼µããã¦ãã¾ããæ¬¡ã®ãããªè¨æ + + (?<=ab(c|de)) + + ã¯ãæä¸ä½ã®æã2ã¤ã®ç°ãªã£ãé·ãã«ããããå¾ãããã使ç¨ã§ã + ã¾ãããããããæä¸ä½ã®æã2ã¤ä½¿ç¨ããããã«æ¸ãæããå ´åã¯ã + 使ç¨å¯è½ã§ãã (?<=abc|abde) - 徿¹è¨æã®å®è£ ã«ããã¦ã¯ãé¸æè¢æ¯ã«ä¸æçã«åºå®ã®å¹ ã ãç¾å¨ã® - ä½ç½®ãå¾éãããããã試ã¿ã¾ããç¾å¨ä½ç½®ã®åã«ååãªæåããªã - å ´åã¯ããããã¯å¤±æã¨ã¿ãªããã¾ãã1度ãã使ç¨ãããªããµãã - ã¿ã¼ã³ã¨çµã¿åããã徿¹è¨æã¯ãæååã®çµç«¯ã§ã®ãããã³ã°ã« - ç¹ã«æç¨ã§ããç¯ã®æå¾ã«1度ã ã使ç¨ãããµããã¿ã¼ã³ã®ä¾ã示ã - ã¾ãã + 徿¹è¨æã®å®è£ ã«ããã¦ã¯ãé¸æè¢æ¯ã«ä¸æçã«åºå®ã®å¹ ã ãç¾å¨ã® + ä½ç½®ãå¾éãããããã試ã¿ã¾ããç¾å¨ä½ç½®ã®åã«ååãªæåããªã + å ´åã¯ããããã¯å¤±æã¨ã¿ãªããã¾ãã1度ãã使ç¨ãããªããµãã + ã¿ã¼ã³ã¨çµã¿åããã徿¹è¨æã¯ãæååã®çµç«¯ã§ã®ãããã³ã°ã« + ç¹ã«æç¨ã§ããç¯ã®æå¾ã«1度ã ã使ç¨ãããµããã¿ã¼ã³ã®ä¾ã示ã + ã¾ãã - (ãããã種é¡ã®)è¤æ°ã®è¨æãé£ç¶ãã¦æå®ãããã¨ãå¯è½ã§ãã - ä¾ãã°ã + (ãããã種é¡ã®)è¤æ°ã®è¨æãé£ç¶ãã¦æå®ãããã¨ãå¯è½ã§ãã + ä¾ãã°ã (?<=\d{3})(?<!999)foo - - ã¯åã« "999" ã§ãªã3æ¡ã®æ°åããã "foo" ã«ããããã¾ãã - åè¨æã¯å¯¾è±¡æååã®åãå ´æã«ç¬ç«ãã¦é©ç¨ããããã¨ã«æ³¨æãã¦ä¸ - ãããã¾ããåã®3æåãå ¨ã¦æ°åã§ãããã¨ããã§ãã¯ãããç¶ãã¦ã - åã3æåã"999"ã§ãªããã¨ã確èªããã¾ãããã®ãã¿ã¼ã³ã¯ã"foo"ã® - åã«6åã®æåãããããã®ççããæ°åã§æå¾ã®3æåã"999"ã§ãªãã - ã¿ã¼ã³ã«ã¯ããããã¾ãããä¾ãã°ã"123abcfoo"ã«ã¯ããããã¾ããã - ãããè¡ããã¿ã¼ã³ã¯æ¬¡ã®ããã«ãªãã¾ãã + + ã¯åã« "999" ã§ãªã3æ¡ã®æ°åããã "foo" ã«ããããã¾ãã + åè¨æã¯å¯¾è±¡æååã®åãå ´æã«ç¬ç«ãã¦é©ç¨ããããã¨ã«æ³¨æãã¦ä¸ + ãããã¾ããåã®3æåãå ¨ã¦æ°åã§ãããã¨ããã§ãã¯ãããç¶ãã¦ã + åã3æåã"999"ã§ãªããã¨ã確èªããã¾ãããã®ãã¿ã¼ã³ã¯ã"foo"ã® + åã«6åã®æåãããããã®ççããæ°åã§æå¾ã®3æåã"999"ã§ãªãã + ã¿ã¼ã³ã«ã¯ããããã¾ãããä¾ãã°ã"123abcfoo"ã«ã¯ããããã¾ããã + ãããè¡ããã¿ã¼ã³ã¯æ¬¡ã®ããã«ãªãã¾ãã (?<=\d{3}...)(?<!999)foo - ãã®æãæåã®è¨æã¯ãå è¡ãã6ã¤ã®æåãæ¢ããæåã®3æåãæ°å - ã§ãããã¨ã確èªãã¾ããç¶ãã¦ã2çªç®ã®è¨æã¯ãå è¡ãã3æåã - "999"ã§ãªããã¨ã確èªãã¾ãã + ãã®æãæåã®è¨æã¯ãå è¡ãã6ã¤ã®æåãæ¢ããæåã®3æåãæ°å + ã§ãããã¨ã確èªãã¾ããç¶ãã¦ã2çªç®ã®è¨æã¯ãå è¡ãã3æåã + "999"ã§ãªããã¨ã確èªãã¾ãã - è¨æã¯ãèªç±ã«çµã¿åããã¦ãã¹ãããããã¨ãå¯è½ã§ããä¾ãã°ã + è¨æã¯ãèªç±ã«çµã¿åããã¦ãã¹ãããããã¨ãå¯è½ã§ããä¾ãã°ã (?<=(?<!foo)bar)baz - ã¯ã"bar" ãåã«ãããéã« "foo" ãåã«ãªã "baz" ã«ããããã¾ãã - 䏿¹ã - + ã¯ã"bar" ãåã«ãããéã« "foo" ãåã«ãªã "baz" ã«ããããã¾ãã + 䏿¹ã + (?<=\d{3}(?!999)...)foo - ã¯ã3æ¡ã®æ°ãå è¡ããä¸ã®3æåã"999"ã§ãªã"foo"ã«ãããããå¥ã® - ãã¿ã¼ã³ã§ãã - - è¨æã®ãµããã¿ã¼ã³ã¯å¤ãåå¾ãããµããã¿ã¼ã³ã§ã¯ãªããç¹°ã - è¿ãããªãããããã¾ãããããã¯ãåããã¨ãè¤æ°åè¨æããã® - ã¯æå³ããªãããã§ããããè¨æãå¤ãåå¾ãããµããã¿ã¼ã³ã - ä¸ã«å«ãã§ããå ´åããã¿ã¼ã³å ¨ä½ã®ä¸ã§å¤ãåå¾ãããµããã¿ã¼ - ã³ãæ°ããããã«å¸¸ã«æ°ãä¸ãããã¾ãã - åå¾ããé¨åæååã¯ãè¯å®è¨æã§ã¯ä½¿ç¨ããã¾ãããå¦å®è¨æ - ã§ã¯æå³ãæã¡ã¾ããã - - è¨æã®æ¬å¼§ã§æ¬ããããµããã¿ã¼ã³ã®æ°ã¯ãæå¤§ 200 ã§ãã - + ã¯ã3æ¡ã®æ°ãå è¡ããä¸ã®3æåã"999"ã§ãªã"foo"ã«ãããããå¥ã® + ãã¿ã¼ã³ã§ãã + + è¨æã®ãµããã¿ã¼ã³ã¯å¤ãåå¾ãããµããã¿ã¼ã³ã§ã¯ãªããç¹°ã + è¿ãããªãããããã¾ãããããã¯ãåããã¨ãè¤æ°åè¨æããã® + ã¯æå³ããªãããã§ããããè¨æãå¤ãåå¾ãããµããã¿ã¼ã³ã + ä¸ã«å«ãã§ããå ´åããã¿ã¼ã³å ¨ä½ã®ä¸ã§å¤ãåå¾ãããµããã¿ã¼ + ã³ãæ°ããããã«å¸¸ã«æ°ãä¸ãããã¾ãã + åå¾ããé¨åæååã¯ãè¯å®è¨æã§ã¯ä½¿ç¨ããã¾ãããå¦å®è¨æ + ã§ã¯æå³ãæã¡ã¾ããã + + è¨æã®æ¬å¼§ã§æ¬ããããµããã¿ã¼ã³ã®æ°ã¯ãæå¤§ 200 ã§ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.onlyonce"> <title>ä¸åã ã使ç¨ãããµããã¿ã¼ã³</title> <literallayout> - å復ãæå¤§åããã³æå°åããå ´åã¯å ±ã«ãå¾ã«ç¶ããã®ã¸ã®ãã - ãã失æããå ´åãå復æ°ãå¤ããå ´åã«ãã¿ã¼ã³ã®æ®ãã«ããã - ãããã¨ãã§ãããã©ããã調ã¹ãããã«å復ããé ç®ãåè©ä¾¡ã - ãã¾ãã - - æã ãããããåä½ãè¡ããªãæ¹ã便å©ãªãã¨ããã¾ãã - ããã¯ããã¿ã¼ã³ã®ä½è ãç¶ãã¦ãã価å¤ããªãã¨ããã£ãæã« - ãããã®ç¹æ§ã夿´ããããä»ã®ãã¨ãããããããåã«å¤±æãã - ãå ´åã§ãã + å復ãæå¤§åããã³æå°åããå ´åã¯å ±ã«ãå¾ã«ç¶ããã®ã¸ã®ãã + ãã失æããå ´åãå復æ°ãå¤ããå ´åã«ãã¿ã¼ã³ã®æ®ãã«ããã + ãããã¨ãã§ãããã©ããã調ã¹ãããã«å復ããé ç®ãåè©ä¾¡ã + ãã¾ãã + + æã ãããããåä½ãè¡ããªãæ¹ã便å©ãªãã¨ããã¾ãã + ããã¯ããã¿ã¼ã³ã®ä½è ãç¶ãã¦ãã価å¤ããªãã¨ããã£ãæã« + ãããã®ç¹æ§ã夿´ããããä»ã®ãã¨ãããããããåã«å¤±æãã + ãå ´åã§ãã - ä¾ãã°ããã¿ã¼ã³ \d+foo ãæ¬¡ã®å¯¾è±¡ã«é©ç¨ããå ´åãèãã¦ã¿ã¾ - ãããã + ä¾ãã°ããã¿ã¼ã³ \d+foo ãæ¬¡ã®å¯¾è±¡ã«é©ç¨ããå ´åãèãã¦ã¿ã¾ + ãããã 123456bar @@ -1849,89 +2328,88 @@ <refsect2 id="regexp.reference.conditional"> <title>æ¡ä»¶ä»ããµããã¿ã¼ã³</title> <literallayout> - è¨æã®çµæã¾ãã¯åã®å¤ãåå¾ãããµããã¿ã¼ã³ãããããããã© - ããã«ããããµããã¿ã¼ã³ã®ãããå¦çãè¡ã£ããããµããã¿ã¼ã³ã® - 2ã¤ã®é¸æè¢ã鏿ããããããã¨ãå¯è½ã§ããæ¡ä»¶ä»ããµããã¿ã¼ - ã³ã«ã¯2ã¤ã®å½¢å¼ãããã¾ãã + è¨æã®çµæã¾ãã¯åã®å¤ãåå¾ãããµããã¿ã¼ã³ãããããããã© + ããã«ããããµããã¿ã¼ã³ã®ãããå¦çãè¡ã£ããããµããã¿ã¼ã³ã® + 2ã¤ã®é¸æè¢ã鏿ããããããã¨ãå¯è½ã§ããæ¡ä»¶ä»ããµããã¿ã¼ + ã³ã«ã¯2ã¤ã®å½¢å¼ãããã¾ãã (?(condition)yes-pattern) (?(condition)yes-pattern|no-pattern) - æ¡ä»¶ãæºããããå ´åãyes-pattern ã使ç¨ããã¾ããããã§ãªã - å ´åã¯ã(æå®ãããå ´åã¯) no-pattern ã使ç¨ããã¾ãããµãã - ã¿ã¼ã³ã«2ã¤ä»¥ä¸ã®é¸æè¢ãããå ´åãã³ã³ãã¤ã«æã«ã¨ã©ã¼ã«ãªã - ã¾ãã - - 2種é¡ã®æ¡ä»¶ãããã¾ããæ¬å¼§ã®éã®ããã¹ããæ°åã®ä¸¦ã³ãããªã - å ´åãæ¡ä»¶ã¯ããã®çªå·ã®å¤ãåå¾ãããµããã¿ã¼ã³ãåã«ããã - ãã¦ããå ´åã«æºãããã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã - å¯èªæ§ãé«ããããã«æå³ã®ãªã空ç½ãæ¿å ¥ã(PCRE_EXTENDED - ãªãã·ã§ã³ãæå®ãããã¨ä»®å®ãã¾ã)ã説æãç°¡åã«ãããã - 3ã¤ã®é¨åã«åå²ãã¦ãã¾ãã + æ¡ä»¶ãæºããããå ´åãyes-pattern ã使ç¨ããã¾ããããã§ãªã + å ´åã¯ã(æå®ãããå ´åã¯) no-pattern ã使ç¨ããã¾ãããµãã + ã¿ã¼ã³ã«2ã¤ä»¥ä¸ã®é¸æè¢ãããå ´åãã³ã³ãã¤ã«æã«ã¨ã©ã¼ã«ãªã + ã¾ãã + + 2種é¡ã®æ¡ä»¶ãããã¾ããæ¬å¼§ã®éã®ããã¹ããæ°åã®ä¸¦ã³ãããªã + å ´åãæ¡ä»¶ã¯ããã®çªå·ã®å¤ãåå¾ãããµããã¿ã¼ã³ãåã«ããã + ãã¦ããå ´åã«æºãããã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã + å¯èªæ§ãé«ããããã«æå³ã®ãªã空ç½ãæ¿å ¥ã(PCRE_EXTENDED + ãªãã·ã§ã³ãæå®ãããã¨ä»®å®ãã¾ã)ã説æãç°¡åã«ãããã + 3ã¤ã®é¨åã«åå²ãã¦ãã¾ãã ( \( )? [^()]+ (?(1) \) ) - æåã®é¨åã¯ããªãã·ã§ã³ã®å·¦æ¬å¼§ã«ããããããã®æåãããå ´ - åã«ãæåã®é¨åæååã¨ãã¦è¨å®ãã¾ãã第2ã®é¨åã¯ãæ¬å¼§ä»¥å¤ - ã®ä¸ã¤ä»¥ä¸ã®æåã«ããããã¾ãã第3ã®é¨åã¯ãæåã®æ¬å¼§ã«ãã - ããããã©ããã調ã¹ãæ¡ä»¶ä»ããµããã¿ã¼ã³ã§ããããããã¦ãã - å ´åãã¤ã¾ãã対象ãå·¦æ¬å¼§ã§å§ã¾ã£ã¦ããå ´åãæ¡ä»¶ã¯&true;㨠- ãªããyes-pattern ãå®è¡ããã峿¬å¼§ãå¿ è¦ã¨ãªãã¾ãã - ããã§ãªãå ´åãno-pattern ãåå¨ããªãããããµããã¿ã¼ã³ã¯ - ä½ã«ãããããã¾ãããè¨ããããã¨ããã®ãã¿ã¼ã³ã¯ãæ¬å¼§ãªã - ã®ä¸¦ã³ã«ããããããªãã·ã§ã³ã§æ¬å¼§ã§å²ã¾ãã並ã³ã«ããããã¾ãã - - æ¡ä»¶ãæ°åã®ä¸¦ã£gå 4åãè¨æã¨ãªãã¾ããè¯å®ãããã¯å¦å®ã® - åæ¹ã¾ãã¯å¾æ¹è¨æã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã - ãã®ãã¿ã¼ã³ã«ãæå³ã®ãªããã¿ã¼ã³ãæ¿å ¥ãã2ã¤ã®é¸æè¢ã2è¡ - ç®ã«ç½®ãã¦ãã¾ãã + æåã®é¨åã¯ããªãã·ã§ã³ã®å·¦æ¬å¼§ã«ããããããã®æåãããå ´ + åã«ãæåã®é¨åæååã¨ãã¦è¨å®ãã¾ãã第2ã®é¨åã¯ãæ¬å¼§ä»¥å¤ + ã®ä¸ã¤ä»¥ä¸ã®æåã«ããããã¾ãã第3ã®é¨åã¯ãæåã®æ¬å¼§ã«ãã + ããããã©ããã調ã¹ãæ¡ä»¶ä»ããµããã¿ã¼ã³ã§ããããããã¦ãã + å ´åãã¤ã¾ãã対象ãå·¦æ¬å¼§ã§å§ã¾ã£ã¦ããå ´åãæ¡ä»¶ã¯&true;㨠+ ãªããyes-pattern ãå®è¡ããã峿¬å¼§ãå¿ è¦ã¨ãªãã¾ãã + ããã§ãªãå ´åãno-pattern ãåå¨ããªãããããµããã¿ã¼ã³ã¯ + ä½ã«ãããããã¾ãããè¨ããããã¨ããã®ãã¿ã¼ã³ã¯ãæ¬å¼§ãªã + ã®ä¸¦ã³ã«ããããããªãã·ã§ã³ã§æ¬å¼§ã§å²ã¾ãã並ã³ã«ããããã¾ãã + + æ¡ä»¶ãæ°åã®ä¸¦ã³ã®å ´åãè¨æã¨ãªãã¾ããè¯å®ãããã¯å¦å®ã® + åæ¹ã¾ãã¯å¾æ¹è¨æã¨ãªãã¾ããæ¬¡ã®ãã¿ã¼ã³ãè¦ã¦ã¿ã¾ãããã + ãã®ãã¿ã¼ã³ã«ãæå³ã®ãªããã¿ã¼ã³ãæ¿å ¥ãã2ã¤ã®é¸æè¢ã2è¡ + ç®ã«ç½®ãã¦ãã¾ãã (?(?=[^a-z]*[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} ) - æ¡ä»¶ã¯ãè¯å®å¾æ¹è¨æã§ãããè±å以å¤ã®æåã®ä¸¦ã³ããã®å¾ã« - è±åãç¶ããã®ã«ããããã¾ããè¨ããããã¨ã対象æååã«å°ãª - ãã¨ãæåãä¸ã¤ãããã©ããã調ã¹ã¾ããæåãã¿ã¤ããã¨ã - æ¤ç´¢å¯¾è±¡ã¯æåã®é¸æè¢ã«å¯¾ãã¦ããããã¾ããã¿ã¤ãããªãå ´å - ã¯ã2çªç®ã«ããããã¾ãããã®ãã¿ã¼ã³ã¯ã2ã¤ã®å½¢å¼ dd-aaa-dd - ã¾ã㯠dd-dd-dd ã®ã©ã¡ããã®æååã«ããããã¾ãããã ãã - aaa ã¯è±åãdd ã¯æ°åã§ãã - + æ¡ä»¶ã¯ãè¯å®å¾æ¹è¨æã§ãããè±å以å¤ã®æåã®ä¸¦ã³ããã®å¾ã« + è±åãç¶ããã®ã«ããããã¾ããè¨ããããã¨ã対象æååã«å°ãª + ãã¨ãæåãä¸ã¤ãããã©ããã調ã¹ã¾ããæåãã¿ã¤ããã¨ã + æ¤ç´¢å¯¾è±¡ã¯æåã®é¸æè¢ã«å¯¾ãã¦ããããã¾ããã¿ã¤ãããªãå ´å + ã¯ã2çªç®ã«ããããã¾ãããã®ãã¿ã¼ã³ã¯ã2ã¤ã®å½¢å¼ dd-aaa-dd + ã¾ã㯠dd-dd-dd ã®ã©ã¡ããã®æååã«ããããã¾ãããã ãã + aaa ã¯è±åãdd ã¯æ°åã§ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.comments"> <title>ã³ã¡ã³ã</title> <literallayout> - (?# ã¨ãã並ã³ã¯ãéå§ãæå®ãã¾ããã³ã¡ã³ãã¯ã次ã®å³æ¬å¼§ã¾ã§ - ç¶ãã¾ããæ¬å¼§ã®ãã¹ãã¯è¨±å¯ããã¾ãããã³ã¡ã³ãä¸ã®æåã¯ã - ãã¿ã¼ã³ãããã³ã°ã«ã¯å ¨ãé¢ä¿ãã¾ããã - - PCRE_EXTENDED ãªãã·ã§ã³ãè¨å®ããã¦ããå ´åãæåã¯ã©ã¹ã®å¤ - ã«ããã¨ã¹ã±ã¼ãããã¦ããªã # æåã¯ãã³ã¡ã³ããæå®ãã¾ãã - ã³ã¡ã³ãã¯ããã¿ã¼ã³ä¸ã®æ¬¡ã®æ¹è¡æåã¾ã§ç¶ãã¾ãã - + (?# ã¨ãã並ã³ã¯ãéå§ãæå®ãã¾ããã³ã¡ã³ãã¯ã次ã®å³æ¬å¼§ã¾ã§ + ç¶ãã¾ããæ¬å¼§ã®ãã¹ãã¯è¨±å¯ããã¾ãããã³ã¡ã³ãä¸ã®æåã¯ã + ãã¿ã¼ã³ãããã³ã°ã«ã¯å ¨ãé¢ä¿ãã¾ããã + + PCRE_EXTENDED ãªãã·ã§ã³ãè¨å®ããã¦ããå ´åãæåã¯ã©ã¹ã®å¤ + ã«ããã¨ã¹ã±ã¼ãããã¦ããªã # æåã¯ãã³ã¡ã³ããæå®ãã¾ãã + ã³ã¡ã³ãã¯ããã¿ã¼ã³ä¸ã®æ¬¡ã®æ¹è¡æåã¾ã§ç¶ãã¾ãã </literallayout> </refsect2> <refsect2 id="regexp.reference.recursive"> <title>å帰çãã¿ã¼ã³</title> <literallayout> - ç¡å¶éã®ãã¹ãã許容ããæ¬å¼§ãå«ãæååã«ããããè¡ãåé¡ãèã - ã¦ã¿ã¾ããããå帰ã使ç¨ããªãå ´åãå®ç¾å¯è½ãªæè¯ã®æ¹æ³ã¯ãä½ã - ãã®åºå®ããæ·±ãã®ãã¹ãã¾ã§ããããè¡ããã¿ã¼ã³ã使ç¨ãããã¨ã§ - ããããã§ã¯ãä»»æã®æ·±ãã®ãã¹ããå¦çãããã¨ã¯ã§ãã¾ãããPerl - 5.6ã§ã¯ã(ä»ã®æ©è½ã¨å ±ã«)æ£è¦è¡¨ç¾ã§å帰ãè¡ããã¨ãå¯è½ã«ããå®é¨ - çãªæ©è½ããµãã¼ãããã¦ãã¾ããå°ç¨ã®ã·ã¼ã±ã³ã¹ (?R)ãå帰ãæå® - ããããã«ãµãã¼ãããã¦ãã¾ãããã®PCREãã¿ã¼ã³ã«ãããã®æ¬å¼§ã® - åé¡ã¯æ¬¡ã®ããã«è§£æ±ºããã¾ãã(空ç½ãç¡è¦ããããã«PCRE_EXTENDED - ãªãã·ã§ã³ãè¨å®ããã¦ããã¨ä»®å®ãã¾ã) + ç¡å¶éã®ãã¹ãã許容ããæ¬å¼§ãå«ãæååã«ããããè¡ãåé¡ãèã + ã¦ã¿ã¾ããããå帰ã使ç¨ããªãå ´åãå®ç¾å¯è½ãªæè¯ã®æ¹æ³ã¯ãä½ã + ãã®åºå®ããæ·±ãã®ãã¹ãã¾ã§ããããè¡ããã¿ã¼ã³ã使ç¨ãããã¨ã§ + ããããã§ã¯ãä»»æã®æ·±ãã®ãã¹ããå¦çãããã¨ã¯ã§ãã¾ãããPerl + 5.6ã§ã¯ã(ä»ã®æ©è½ã¨å ±ã«)æ£è¦è¡¨ç¾ã§å帰ãè¡ããã¨ãå¯è½ã«ããå®é¨ + çãªæ©è½ããµãã¼ãããã¦ãã¾ããå°ç¨ã®ã·ã¼ã±ã³ã¹ (?R)ãå帰ãæå® + ããããã«ãµãã¼ãããã¦ãã¾ãããã®PCREãã¿ã¼ã³ã«ãããã®æ¬å¼§ã® + åé¡ã¯æ¬¡ã®ããã«è§£æ±ºããã¾ãã(空ç½ãç¡è¦ããããã«<link + linkend="pcre.pattern.modifiers">PCRE_EXTENDED</link>ãªãã·ã§ã³ + ãè¨å®ããã¦ããã¨ä»®å®ãã¾ã) \( ( (?>[^()]+) | (?R) )* \) - ã¾ãããã®ãã¿ã¼ã³ã¯éãæ¬å¼§ã«ããããã¾ããç¶ãã¦ãæ¬å¼§ä»¥å¤ã®ä¸¦ - ã³ã¾ãã¯ãã¿ã¼ã³èªä½ã«å帰çã«ãããããé¨åæååã«ä½åã§ããã - ããã¾ããæå¾ã«éãæ¬å¼§ã«ããããã¾ãã + ã¾ãããã®ãã¿ã¼ã³ã¯éãæ¬å¼§ã«ããããã¾ããç¶ãã¦ãæ¬å¼§ä»¥å¤ã®ä¸¦ + ã³ã¾ãã¯ãã¿ã¼ã³èªä½ã«å帰çã«ãããããé¨åæååã«ä½åã§ããã + ããã¾ããæå¾ã«éãæ¬å¼§ã«ããããã¾ãã ãã®ãã¿ã¼ã³ä¾ã«ã¯ããã¹ãããç¡å¶éã®å復ãå«ã¾ãã¦ããããã®ã ãããããããªãæååã®ãã¿ã¼ã³ãé©ç¨ããéã«æ¬å¼§ä»¥å¤ã®æååã« @@ -1955,15 +2433,15 @@ 次ã®ããã«æ¬å¼§ã追å ããã¨ã \( ( ( (?>[^()]+) | (?R) )* ) \) - ^ ^ - ^ ^ åå¾ãããæååã¯ã"ab(cd)ef" 㨠- ãªããæä¸ä½ã¬ãã«ã®æ¬å¼§ã®ä¸èº«ã¨ãªãã¾ããä¸ã¤ã®ãã¿ã¼ã³å ã« - 15以ä¸ã®åå¾ç¨æ¬å¼§ãããå ´åãPCREã¯å帰ã®éã®ãã¼ã¿ä¿åç¨ã« - 追å ã®ã¡ã¢ãªãåå¾ããå¿ è¦ãããã¾ããããã¯ãpcre_malloc ã« - ãã確ä¿ãããå¾ã§ pcre_free ã«ããéæ¾ããã¾ããã¡ã¢ãªãå - å¾ã§ããªãå ´åãã¡ã¢ãªä¸è¶³ã¨ã©ã¼ãå帰ã®å å´ããåºåããææ®µ - ã¯ãªããããæåã®15åã®åå¾ç¨æ¬å¼§ã«ã¤ãã¦ã®ã¿ãã¼ã¿ãä¿åã - ãã¾ãã + + åå¾ãããæååã¯ã"ab(cd)ef" 㨠+ ãªããæä¸ä½ã¬ãã«ã®æ¬å¼§ã®ä¸èº«ã¨ãªãã¾ããä¸ã¤ã®ãã¿ã¼ã³å ã« + 15以ä¸ã®åå¾ç¨æ¬å¼§ãããå ´åãPCREã¯å帰ã®éã®ãã¼ã¿ä¿åç¨ã« + 追å ã®ã¡ã¢ãªãåå¾ããå¿ è¦ãããã¾ããããã¯ãpcre_malloc ã« + ãã確ä¿ãããå¾ã§ pcre_free ã«ããéæ¾ããã¾ããã¡ã¢ãªãå + å¾ã§ããªãå ´åãã¡ã¢ãªä¸è¶³ã¨ã©ã¼ãå帰ã®å å´ããåºåããææ®µ + ã¯ãªããããæåã®15åã®åå¾ç¨æ¬å¼§ã«ã¤ãã¦ã®ã¿ãã¼ã¿ãä¿åã + ãã¾ãã </literallayout> </refsect2> @@ -1977,11 +2455,13 @@ æ§è½åä¸ã®ããã«æ£è¦è¡¨ç¾ã®æé©åã«é¢ããå¤ãã®è°è«ã è¨è¿°ããã¦ãã¾ãã - ãã¿ã¼ã³ã .* ã§å§ã¾ããPCRE_DOTALL ãªãã·ã§ã³ãè¨å®ããã¦ãã - å ´åã対象æååã®å§ç«¯ã§ããã¾ã£ã¡ã§ããªãããããã¿ã¼ã³ã¯ - PCRE ã«ããæé»ã®ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã - ããããPCRE_DOTALL ãè¨å®ããã¦ããªãå ´åãã¡ã¿æå . ã - æ¹è¡ã«ãããããªãã®ã§ãPCREã¯ãã®æé©åãè¡ãã¾ããã + ãã¿ã¼ã³ã .* ã§å§ã¾ãã<link + linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãªãã·ã§ã³ãè¨ + å®ããã¦ããå ´åã対象æååã®å§ç«¯ã§ããã¾ã£ã¡ã§ããªãããããã¿ã¼ + ã³ã¯PCREã«ããæé»ã®ãã¡ã«ã¢ã³ã«ã¼ä»ãã¨ãªãã¾ãã + ãããã<link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link> + ãè¨å®ããã¦ããªãå ´åãã¡ã¿æå . ãæ¹è¡ã«ãããããªãã®ã§ãPCRE + ã¯ãã®æé©åãè¡ãã¾ããã 対象æååãæ¹è¡ãå«ãå ´åããã¿ã¼ã³ã¯æååã®å§ç«¯ããã§ã¯ãªã åæ¹è¡ã®ç´å¾ã®æåãããããããå¯è½æ§ãããã¾ããä¾ãã°ã ãã¿ã¼ã³ @@ -1995,8 +2475,9 @@ éå§ããå¿ è¦ãããã¾ãã ãã®ãããªãã¿ã¼ã³ãæ¹è¡ãå«ã¾ãªã対象æååã«ä½¿ç¨ããå ´åã - PCRE_DOTALL ãè¨å®ããããã¢ã³ã«ã¼ä»ãã§ãããã¨ãé½ã«ç¤ºããã - ã«ãã¿ã¼ã³ã ^.* ã§éå§ãããã¨ã«ããæé«ã®æ§è½ãå¾ããã¾ãã + <link linkend="pcre.pattern.modifiers">PCRE_DOTALL</link>ãè¨å®ã + ãããã¢ã³ã«ã¼ä»ãã§ãããã¨ãé½ã«ç¤ºãããã«ãã¿ã¼ã³ã ^.* ã§éå§ + ãããã¨ã«ããæé«ã®æ§è½ãå¾ããã¾ãã ããã«ãããPCRE ã対象æååã®æ¹è¡ãæ¢ããããã§åã¹ã¿ã¼ã ãããã¨ã鲿¢ãã¾ãã @@ -2006,29 +2487,29 @@ (a+)* - ããã¯ã33éãã®ç°ãªã£ãæ¹æ³ã§ã"aaaa"ã«ããããã¾ãããã®æ°ã¯ã - æååãé·ããªãã«ã¤ãã¦æ¥æ¿ã«å¢å¤§ãã¾ãã(* å復ã¯ã0ã1ã2ã3ã - 4åããããã0以å¤ã®åã ã®ã±ã¼ã¹ã§ã+å復ã¯ç°ãªã£ãåæ°åãããã - ã¾ã) ãã¿ã¼ã³ã®æ®ãã«ãããå ¨ä½ã失æãããããªãã¿ã¼ã³ã§ããå ´ - åãPCREã¯åºæ¬çã«å ¨ã¦ã®å¯è½æ§ããã鏿è¢ã調ã¹ããããé常ã«é· - ãæéããããã¾ãã + ããã¯ã33éãã®ç°ãªã£ãæ¹æ³ã§ã"aaaa"ã«ããããã¾ãããã®æ°ã¯ã + æååãé·ããªãã«ã¤ãã¦æ¥æ¿ã«å¢å¤§ãã¾ãã(* å復ã¯ã0ã1ã2ã3ã + 4åããããã0以å¤ã®åã ã®ã±ã¼ã¹ã§ã+å復ã¯ç°ãªã£ãåæ°åãããã + ã¾ã) ãã¿ã¼ã³ã®æ®ãã«ãããå ¨ä½ã失æãããããªãã¿ã¼ã³ã§ããå ´ + åãPCREã¯åºæ¬çã«å ¨ã¦ã®å¯è½æ§ããã鏿è¢ã調ã¹ããããé常ã«é· + ãæéããããã¾ãã - 次ã®ããã«æåãªãã©ã«ãå¾ã«ãããããªããç°¡åãªå ´åã«ã¯æé©åã - å¯è½ã§ãã + 次ã®ããã«æåãªãã©ã«ãå¾ã«ãããããªããç°¡åãªå ´åã«ã¯æé©åã + å¯è½ã§ãã (a+)*b - æ¨æºã®ãããæé ã«çæããåã«ãPCREã¯å¯¾è±¡æååã®å¾ã®æ¹ã«"b"ãã - ããã©ããã調ã¹ã¾ããããããªãå ´åã«ã¯ãç´ã¡ã«ãããã¯å¤±æãã¾ - ãããããããªãã©ã«ãå¾ã«ãªãå ´åã«ã¯ããã®æé©åã使ç¨ããã㨠- ã¯ã§ãã¾ããã以ä¸ã®ãã¿ã¼ã³ã¨ä¸ã®ãã¿ã¼ã³ã®åä½ã®å·®ç°ãæ¯è¼ã㦠- ã¿ã¾ãããã + æ¨æºã®ãããæé ã«çæããåã«ãPCREã¯å¯¾è±¡æååã®å¾ã®æ¹ã«"b"ãã + ããã©ããã調ã¹ã¾ããããããªãå ´åã«ã¯ãç´ã¡ã«ãããã¯å¤±æãã¾ + ãããããããªãã©ã«ãå¾ã«ãªãå ´åã«ã¯ããã®æé©åã使ç¨ããã㨠+ ã¯ã§ãã¾ããã以ä¸ã®ãã¿ã¼ã³ã¨ä¸ã®ãã¿ã¼ã³ã®åä½ã®å·®ç°ãæ¯è¼ã㦠+ ã¿ã¾ãããã (a+)*\d - åè ã¯ãå ¨ä½ã "a" æåã§ããè¡ã«é©ç¨ãããå ´åã«ã»ã¼ç¬éçã«å¤±æ - ã¨å¤å®ãã¾ãã䏿¹ãå¾è ã§ã¯ãããã20æåããé·ãæååã§ã¯ã㪠- ãã®æéããããã¾ãã + åè ã¯ãå ¨ä½ã "a" æåã§ããè¡ã«é©ç¨ãããå ´åã«ã»ã¼ç¬éçã«å¤±æ + ã¨å¤å®ãã¾ãã䏿¹ãå¾è ã§ã¯ãããã20æåããé·ãæååã§ã¯ã㪠+ ãã®æéããããã¾ãã </literallayout> </refsect2> </refsect1> Index: phpdoc/ja/functions/pdf.xml diff -u phpdoc/ja/functions/pdf.xml:1.29 phpdoc/ja/functions/pdf.xml:1.30 --- phpdoc/ja/functions/pdf.xml:1.29 Sun Jan 6 22:23:28 2002 +++ phpdoc/ja/functions/pdf.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.30 $ --> <reference id="ref.pdf"> <title>pdf 颿°</title> <titleabbrev>pdf</titleabbrev> Index: phpdoc/ja/functions/pfpro.xml diff -u phpdoc/ja/functions/pfpro.xml:1.7 phpdoc/ja/functions/pfpro.xml:1.8 --- phpdoc/ja/functions/pfpro.xml:1.7 Wed Dec 12 15:53:33 2001 +++ phpdoc/ja/functions/pfpro.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <reference id="ref.pfpro"> <title>Verisign Payflow Pro 颿°</title> <titleabbrev>Verisign Payflow Pro</titleabbrev> @@ -110,7 +111,6 @@ <funcprototype> <funcdef>array <function>pfpro_process</function></funcdef> <paramdef>array <parameter>parameters</parameter></paramdef> - <paramdef>string <parameter> <replaceable><optional>address</optional></replaceable> @@ -193,7 +193,8 @@ <example> <title>Payflow Proã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php pfpro_init(); @@ -224,6 +225,7 @@ pfpro_cleanup(); ?> +]]> </programlisting> </example> </refsect1> @@ -302,11 +304,12 @@ <example> <title>Payflow Pro raw ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php pfpro_init(); -$response = pfpro_process("USER=mylogin&PWD[5]=m&ndy&TRXTYPE=S&TENDER=C&AMT=1.50&ACCT=4111111111111111&EXPDATE=0904"); +$response = pfpro_process("USER=mylogin&PWD[5]=m&ndy&TRXTYPE=S&TENDER=C&AMT=1.50&ACCT=4111111111111111&EXPDATE=0904"); if (!$response) { die("Couldn't establish link to Verisign.\n"); @@ -317,11 +320,11 @@ pfpro_cleanup(); ?> +]]> </programlisting> </example> </refsect1> </refentry> - <refentry id="function.pfpro-version"> <refnamediv> Index: phpdoc/ja/functions/pgsql.xml diff -u phpdoc/ja/functions/pgsql.xml:1.31 phpdoc/ja/functions/pgsql.xml:1.32 --- phpdoc/ja/functions/pgsql.xml:1.31 Wed Dec 19 10:34:51 2001 +++ phpdoc/ja/functions/pgsql.xml Sat Jan 26 10:38:34 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.31 $ --> +<!-- $Revision: 1.32 $ --> <reference id="ref.pgsql"> <title>PostgreSQL 颿°</title> <titleabbrev>PostgreSQL</titleabbrev> @@ -20,6 +20,37 @@ ä½åãã®ãªãªã¼ã¹ã§ã使ç¨å¯è½ã§ãããå°æ¥çã«åé¤ãããå¯è½æ§ãã ãã¾ããCVSãã¼ã¸ã§ã³ã«ã¯ãæ°ãã颿°åãä»ãããã¦ãã¾ãã </para> + <example> + <title>颿°åã®å¤æ´</title> + <programlisting role="php"> +<![CDATA[ +OLD NAME NEW NAME +pg_exec pg_query +getlastoid pg_last_oid +pg_cmdtuples pg_affected_rows +pg_errormessage pg_last_error +pg_numrows pg_num_rows +pg_numfields pg_num_fields +pg_fieldname pg_field_name +pg_fieldsize pg_field_size +pg_fieldtype pg_field_type +pg_fieldnum pg_field_num +pg_fieldprtlen pg_field_prtlen +pg_fieldisnull pg_field_is_null +pg_freeresult pg_free_result +pg_result pg_fetch_result +pg_loreadall pg_lo_read_all +pg_locreate pg_lo_create +pg_lounlink pg_lo_unlink +pg_loopen pg_lo_open +pg_loclose pg_lo_close +pg_loread pg_lo_read +pg_lowrite pg_lo_write +pg_loimport pg_lo_import +pg_loexport pg_lo_export +]]> + </programlisting> + </example> <para> 徿¥ã®pg_connect()/pg_pconnect() ã¯ãå°æ¥çã«åææ¥ç¶æ©è½ããµãã¼ ãããããã«éå»ã®ãã®ã¨ãªãå¯è½æ§ãããã¾ãã @@ -398,22 +429,40 @@ </funcprototype> </funcsynopsis> <para> - ã¯ã¨ãªã¼ã«å¤±æããããconnectionãæå¹ãªæ¥ç¶IDã§ãªãå ´åã¯&false;ã - è¿ãã¾ããconnectionãæå¹ãªå¤ã§ããã°ã + <function>pg_exec</function>ã¯ãã¯ã¨ãªãå®è¡ã§ããå ´åãã¯ã¨ãªçµ + æãªã½ã¼ã¹ãè¿ãã¾ããã¯ã¨ãªã¼ã«å¤±æããããconnectionãæå¹ãªæ¥ + ç¶IDã§ãªãå ´åã¯&false;ãè¿ãã¾ããconnectionãæå¹ãªå¤ã§ããã°ã <function>pg_errormessage</function>颿°ã«ããã¨ã©ã¼ã®è©³ç´° ãå¾ããã¨ãã§ãã¾ãã<function>pg_exec</function>颿°ã¯ãæ¥ç¶IDã«ãã æå®ãããPostgreSQLãã¼ã¿ãã¼ã¹ã«å¯¾ãã¦SQLã¹ãã¼ãã¡ã³ããéä¿¡ãã¾ãã - connectionã¯<function>pg_connect</function>ã«ããè¿ãããæå¹ãªID - ã§ãªããã°ãªãã¾ããããã®é¢æ°ã®è¿ãå¤ã¯ã¤ã³ããã¯ã¹å¤ã§ããã - ãã®ä»ã®PostgreSQL颿°ããçµæãã¢ã¯ã»ã¹ããéã«ä½¿ããã¾ãã + connectionã¯<function>pg_connect</function>ã¾ã㯠+ <function>pg_pconnect</function>ã«ããè¿ãããæå¹ãªIDã§ãªããã° + ãªãã¾ããããã®é¢æ°ã®è¿ãå¤ã¯ã¯ã¨ãªæ¬ 課ãªã½ã¼ã¹ã§ããã + <function>pg_fetch_array</function>ã®ãããªãã®ä»ã®PostgreSQL颿° + ãçµæã«ã¢ã¯ã»ã¹ããéã«ä½¿ããã¾ãã <note> <simpara> - PHP/FIã§ã¯ãã¯ã¨ãªã¼ããã¼ã¿ãè¿ããã¨ãæå¾ ãããªãå ´å - (ãã¨ãã°INSERTãUPDATE)ã¯1ãè¿ããã¾ãä½ãè¿ããªãã£ãSELECTã® - å ´åã§ã1ãã大ããªå¤ãè¿ãã¾ããPHPã§ã¯ãã®ãããªä»®å®ã¯è¡ãã¾ããã + <parameter>connection</parameter>ã¯ã + <function>pg_exec</function>ã®ãªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã§ãã + <parameter>connection</parameter>ã使ç¨ãããå ´åãããã©ã«ãã® + æ¥ç¶ã使ç¨ããã¾ããããã©ã«ãã®æ¥ç¶ã¯ã + <function>pg_connect</function>ã¾ã㯠+ <function>pg_pconnect</function>ã«ãã使ãããç´è¿ã®æ¥ç¶ã§ãã + </simpara> + <simpara> + <parameter>connection</parameter>ã¯çç¥ã§ãã¾ãããã¹ã¯ãªããã® + ãã°ãçºè¦ãã«ãããªããããçç¥ã¯æ¨å¥¨ããã¾ããã </simpara> </note> </para> + <para> + <function>pg_connect</function>, + <function>pg_pconnect</function>, + <function>pg_fetch_array</function>, + <function>pg_fetch_object</function>, + <function>pg_numrows</function>, + and <function>pg_cmdtuples</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> @@ -428,14 +477,17 @@ <funcprototype> <funcdef>array <function>pg_fetch_array</function></funcdef> <paramdef>resource <parameter>result</parameter></paramdef> - <paramdef>int <parameter>row</parameter></paramdef> + <paramdef>int + <parameter><optional>row</optional></parameter> + </paramdef> <paramdef>int <parameter><optional>result_type</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> - <para> - è¿ãå¤: åå¾ãããè¡ãä¿æããé åãè¡ããããªãå ´åã¯&false;ã + <para> + <function>pg_fetch_array</function>ã¯ãåå¾ãããè¡(ã¿ãã«/ã¬ã³ã¼ + ã)ãä¿æããé åãè¿ãã¾ããè¡ããããªãå ´åã¯&false;ãè¿ãã¾ãã </para> <para> <function>pg_fetch_array</function>ã¯æ¡å¼µçã® @@ -444,9 +496,18 @@ ãã£ã¼ã«ãåããã¼ã¨ãã¦ãã¼ã¿ã飿³ã¤ã³ããã¯ã¹ã«ãä¿åãã¾ãã </para> <para> - <function>pg_fetch_array</function>ã® - 3çªç®ã®å¼æ°(ãªãã·ã§ã³)<parameter>result_type</parameter>㯠- 宿°ã§ãããPGSQL_ASSOCãPGSQL_NUMãPGSQL_BOTHã®ã©ããã¨ãªãã¾ãã + <parameter>row</parameter>ã¯ãåå¾ããè¡(ã¬ã³ã¼ã)çªå·ã§ããæå + ã®è¡ã¯0ã§ãã + </para> + <para> + <parameter>result_type</parameter>ã¯ãè¿ãå¤ã®åæåæ¹æ³ãå¶å¾¡ã + ããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã§ãã<parameter>result_type</parameter> + ã¯å®æ°ã§ãããæ¬¡ã®å¤ã®ã©ããã¨ãããã¨ãå¯è½ã§ãã: PGSQL_ASSOC, + PGSQL_NUM, and PGSQL_BOTHã + <function>pg_fetch_array</function>ã¯ãPGSQL_ASSOCã®ãã¼ã¨ãã¦ãã£ã¼ + ã«ãåããã飿³é åãè¿ãã¾ããPGSQL_NUMããã¼ã¨ããå ´åã¯ãã£ã¼ + ã«ãæ·»åãPGSQL_BOTHããã¼ã¨ããå ´åã¯ãã£ã¼ã«ãå/æ·»åã§ããããã© + ã«ãã¯ãPGSQL_BOTHã§ãã <note> <para> <parameter>result_type</parameter>ã¯PHP4.0ã§è¿½å ããã¾ããã @@ -460,12 +521,15 @@ 極端ã«é ããªãããã§ã¯ãªãã¨ãããã¨ãããããã¾ãã </para> <para> - æ´ã«è©³ç´°ãªæ å ±ã¯ã<function>pg_fetch_row</function>ãåç §ä¸ããã + <function>pg_fetch_row</function>ã + <function>pg_fetch_object</function>ã + <function>pg_result</function>ãåç §ä¸ããã </para> - <example> - <title>PostgreSQLã«ããé åã®åå¾</title> - <programlisting role="php"> - <![CDATA[ + <para> + <example> + <title>PostgreSQLã«ããé åã®åå¾</title> + <programlisting role="php"> +<![CDATA[ <?php $conn = pg_pconnect ("dbname=publisher"); if (!$conn) { @@ -486,8 +550,14 @@ echo $arr["author"] . " <- array\n"; ?> ]]> - </programlisting> - </example> + </programlisting> + </example> + </para> + <note> + <para> + 4.1.0以éã<parameter>row</parameter>ã¯ãªãã·ã§ã³ã§ãã + </para> + </note> </refsect1> </refentry> @@ -509,20 +579,28 @@ </funcprototype> </funcsynopsis> <para> - è¿ãå¤: åå¾ããè¡ã«å¯¾å¿ããããããã£ãæãããªãã¸ã§ã¯ãã - è¡ããããªãå ´åã¯&false;ã + <function>pg_fetch_object</function>ã¯ãåå¾ããè¡ã«å¯¾å¿ãããã + ããã£ãæãããªãã¸ã§ã¯ããè¿ãã¾ãããã®é¢æ°ã¯ãè¡ããããªãå ´ + åã¾ãã¯ã¨ã©ã¼ã«ã¯&false;ãè¿ãã¾ãã </para> <para> - <function>pg_fetch_object</function>ã¯<function>pg_fetch_array</function> - ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ããã«ãªãã¸ã§ã¯ããè¿ããã¨ããéããããã¾ãã - 鿥çã«ããã®ãã¨ã¯ãã¼ã¿ããªãã»ããã§ã¯ãªã - ãã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ã¢ã¯ã»ã¹å¯è½ã§ãããã¨ãæå³ãã¾ãã - (æ°åã¯ããããã£åã¨ãã¦ä½¿ç¨ã§ãã¾ããã) + <function>pg_fetch_object</function>㯠+ <function>pg_fetch_array</function>ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ããã« + ãªãã¸ã§ã¯ããè¿ããã¨ããéããããã¾ãã鿥çã«ããã®ãã¨ã¯ãã¼ + ã¿ããªãã»ããã§ã¯ãªããã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ã¢ã¯ã»ã¹å¯è½ã§ãã + ãã¨ãæå³ãã¾ãã(æ°åã¯ããããã£åã¨ãã¦ä½¿ç¨ã§ãã¾ããã) + </para> + <para> + <parameter>result_type</parameter>ã¯ãè¿ãå¤ã®åæåæ¹æ³ãå¶å¾¡ã + ããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã§ãã<parameter>result_type</parameter> + ã¯å®æ°ã§ãããæ¬¡ã®å¤ã®ã©ããã¨ãããã¨ãå¯è½ã§ãã: PGSQL_ASSOC, + PGSQL_NUM, and PGSQL_BOTHã + <function>pg_fetch_array</function>ã¯ãPGSQL_ASSOCã®ãã¼ã¨ãã¦ãã£ã¼ + ã«ãåããã飿³é åãè¿ãã¾ããPGSQL_NUMããã¼ã¨ããå ´åã¯ãã£ã¼ + ã«ãæ·»åãPGSQL_BOTHããã¼ã¨ããå ´åã¯ãã£ã¼ã«ãå/æ·»åã§ããããã© + ã«ãã¯ãPGSQL_BOTHã§ãã </para> <para> - <function>pg_fetch_array</function>ã®3çªç®ã®å¼æ°(ãªãã·ã§ã³) - <parameter>result_type</parameter>ã¯å®æ°ã§ããã - PGSQL_ASSOCãPGSQL_NUMãPGSQL_BOTHã®ã©ããã¨ãªãã¾ãã <note> <para> <parameter>result_type</parameter>ã¯PHP4.0ã§è¿½å ããã¾ããã @@ -535,7 +613,8 @@ (éãã¯ãããã§ã) </para> <para> - <function>pg_fetch_array</function>ã<function>pg_fetch_row</function> + <function>pg_exec</function>, <function>pg_fetch_array</function>, + <function>pg_fetch_row</function>, <function>pg_result</function> ãåç §ä¸ããã <example> <title>Postgres ã«ãããªãã¸ã§ã¯ããåå¾ãã</title> @@ -584,6 +663,11 @@ </programlisting> </example> </para> + <note> + <para> + 4.1.0以éã<parameter>row</parameter>ã¯ãªãã·ã§ã³ã§ãã + </para> + </note> </refsect1> </refentry> @@ -601,15 +685,17 @@ <paramdef>int <parameter>row</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - è¿ãå¤: åå¾ãããè¡ãæããé åãè¡ããããªãå ´åã«&false;ã - </para> <para> <function>pg_fetch_row</function>ã¯æå®ããçµæIDãæãçµæãã - 1è¡åã®ãã¼ã¿ãåå¾ãã¾ããè¡ã¯é åã¨ãã¦è¿ããã¾ãã + 1è¡åã®ãã¼ã¿ãåå¾ãã¾ããè¡(ã¬ã³ã¼ã)ã¯é åã¨ãã¦è¿ããã¾ãã åçµæã«ã©ã ã¯ããªãã»ããå¤0ããå§ã¾ãé åã«ä¿åããã¾ãã </para> + <para> + åå¾ããè¡ã«å¯¾å¿ããé åãè¿ãã¾ããè¡ããããªãå ´åã&false;ãè¿ + ãã¾ãã + </para> <para> + <function>pg_exec</function>, <function>pg_fetch_array</function>, <function>pg_fetch_object</function>, <function>pg_result</function> ãåç §ä¸ããã @@ -648,12 +734,17 @@ </programlisting> </example> </para> + <note> + <para> + 4.1.0以éã<parameter>row</parameter>ã¯ãªãã·ã§ã³ã¨ãªãã¾ããã + </para> + </note> </refsect1> </refentry> <refentry id="function.pg-fieldisnull"> <refnamediv> - <refname>pg_FieldIsNull</refname> + <refname>pg_fieldisnull</refname> <refpurpose>ãã£ã¼ã«ãã&null;ãã©ãã調ã¹ã</refpurpose> </refnamediv> <refsect1> @@ -667,9 +758,10 @@ </funcprototype> </funcsynopsis> <para> - ãã£ã¼ã«ãã&null;ãã©ãã調ã¹ã¾ããrowã§æå®ããè¡ã®ãã£ã¼ã«ãã - &null;ã§ãªãå ´åã¯0ãè¿ãã&null;ã ã£ãå ´åã¯1ãè¿ãã¾ããfieldã¯çªå· - ã¾ãã¯ãã£ã¼ã«ãåã§æå®ãã¾ããrowã®çªå·ä»ãã¯0ããå§ã¾ãã¾ãã + <function>pg_fieldisnull</function>ã¯ããã£ã¼ã«ãã&null;ãã©ãã + 調ã¹ã¾ããrowã§æå®ããè¡ã®ãã£ã¼ã«ãã&null;ã§ãªãå ´åã¯0ãè¿ãã + &null;ã ã£ãå ´åã¯1ãè¿ãã¾ããfieldã¯çªå·ã¾ãã¯ãã£ã¼ã«ãåã§æ + å®ãã¾ããrowã®çªå·ä»ãã¯0ããå§ã¾ãã¾ãã </para> </refsect1> </refentry> @@ -689,9 +781,13 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldname</function>ã¯ãæå®ããPostgreSQLçµæIDã®ä¸ã® - ã«ã©ã çªå·ã«å¯¾å¿ãããã£ã¼ã«ãã®ååãè¿ãã¾ãããã£ã¼ã«ãçªå·ã¯ - 0ããå§ã¾ãã¾ãã + <function>pg_fieldname</function>ã¯ãæå®ããPostgreSQL + <parameter>result</parameter>ãªã½ã¼ã¹ã®æå®ãã + <parameter>field_number</parameter>ã«ãããã£ã¼ã«ãã®ååãè¿ + ãã¾ãããã£ã¼ã«ãçªå·ã¯0ããå§ã¾ãã¾ãã + </para> + <para> + <function>pg_fieldnum</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -711,9 +807,14 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldnum</function>ã¯ãæå®ããPostgreSQLã®çµæIDã®ä¸ã® - ãã£ã¼ã«ãåã«å¯¾å¿ããã«ã©ã çªå·ãè¿ãã¾ãããã£ã¼ã«ãçªå·ã¯0ãã - å§ã¾ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã«-1ãè¿ãã¾ãã + <function>pg_fieldnum</function>ã¯ãæå®ããPostgreSQL + <parameter>result</parameter>ãªã½ã¼ã¹ã® + <parameter>field_name</parameter>ã«å¯¾å¿ããã«ã©ã (ã¹ããã)çªå·ã + è¿ãã¾ãããã£ã¼ã«ãçªå·ã¯0ããå§ã¾ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´ + åã«-1ãè¿ãã¾ãã + </para> + <para> + <function>pg_fieldname</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -734,10 +835,13 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldprtlen</function>ã¯ãPostgreSQLã®çµæã® - æå®ããå¤ã«é¢ãã¦å®éã«è¡¨ç¤ºããå ´åã®é·ã(æåã®æ°)ãè¿ãã¾ãã - è¡çªå·(row_number)ã¯0ããå§ã¾ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã«-1ã - è¿ãã¾ãã + <function>pg_fieldprtlen</function>ã¯ãPostgreSQLã® + <parameter>result</parameter>ã®æå®ããå¤ã«é¢ãã¦å®éã«è¡¨ç¤ºããå ´ + åã®é·ã(æåã®æ°)ãè¿ãã¾ããè¡çªå·(row_number)ã¯0ããå§ã¾ãã¾ãã + ãã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã«-1ãè¿ãã¾ãã + </para> + <para> + <function>pg_fieldsize</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -765,6 +869,10 @@ ãã£ã¼ã«ããµã¤ãºã-1ã®å ´åããã®é ç®ã¯å¯å¤é·ãã£ã¼ã«ãã§ãããã¨ã 示ãã¾ãããã®é¢æ°ã¯ãã¨ã©ã¼ã®å ´åã¯&false;ãè¿ãã¾ãã </para> + <para> + <function>pg_fieldlen</function>ããã³ + <function>pg_fieldtype</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> @@ -785,9 +893,14 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_fieldtype</function>ã¯ãæå®ããPostgreSQLã®çµæã«ããã¦ã - æå®ãã£ã¼ã«ãã®ååãä¿æããæååãè¿ãã¾ãããã£ã¼ã«ãçªå· - (field_number)ã¯0ããå§ã¾ãã¾ãã + <function>pg_fieldtype</function>ã¯ãæå®ããPostgreSQLã® + <parameter>result</parameter>ãªã½ã¼ã¹ã«ããã¦ãæå®ãã + <parameter>field_number</parameter>ã®ååãä¿æããæååãè¿ãã¾ + ãããã£ã¼ã«ãçªå·(field_number)ã¯0ããå§ã¾ãã¾ãã + </para> + <para> + <function>pg_fieldlen</function>ããã³ + <function>pg_fieldname</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -801,18 +914,22 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>pg_freeresult</function></funcdef> + <funcdef>bool <function>pg_freeresult</function></funcdef> <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>pg_freeresult</function>ã¯ãã¹ã¯ãªããå®è¡ä¸ã®ã¡ã¢ãªä½¿ç¨é + <function>pg_freeresult</function>ã¯ãã¹ã¯ãªããå®è¡ä¸ã®ã¡ã¢ãªä½¿ç¨é ãæå¶ãããå ´åã«ã®ã¿ã³ã¼ã«ããå¿ è¦ãããã¾ãããã¹ã¦ã®çµæä¿æç¨ ã¡ã¢ãªã¯ãã¹ã¯ãªãããçµäºããéã«èªåçã«éæ¾ããã¾ãã ããããªããããã®ã¹ã¯ãªããã«ããã¦ããã以ä¸ã®çµæãã¼ã¿ã - å¿ è¦ã¨ããªããã¨ã確å®ã§ããã°ãçµæID(result_id)ã弿°ã¨ã㦠- <function>pg_freeresult</function>ãã³ã¼ã«ãããã¨ãå¯è½ã§ãã - ããã«ãããé¢é£ããã¡ã¢ãªã¯éæ¾ããã¾ãã + å¿ è¦ã¨ããªããã¨ã確å®ã§ããã°ã<parameter>result</parameter>ãªã½ã¼ + ã¹ã弿°ã¨ãã¦<function>pg_freeresult</function>ãã³ã¼ã«ããé¢é£ + ããã¡ã¢ãªãè§£æ¾ãããã¨ãå¯è½ã§ãããã®é¢æ°ã¯æåæã«trueãã¨ã©ã¼ + çºçæã«falseãè¿ãã¾ãã + </para> + <para> + <function>pg_exec</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -833,10 +950,13 @@ <para> <function>pg_getlastoid</function>ã¯ã<function>pg_Exec</function>ã§ å®è¡ãããç´è¿ã®ã³ãã³ããSQLã®INSERTã ã£ãå ´åãæ¿å ¥ãããã¿ãã«ã«å² - ãå½ã¦ãããoid(ãªãã¸ã§ã¯ã ID)ãåãåºãã¾ããæå¹ãªoidãããã°ã - ãã®é¢æ°ã¯æ£ã®æ´æ°ãè¿ãã¾ããã¨ã©ã¼ãèµ·ãã£ããã - <function>pg_exec</function>ã§å®è¡ãããæå¾ã®ã³ãã³ããSQLã® - INSERTã§ãªãã£ãå ´åã¯-1ãè¿ãã¾ãã + ãå½ã¦ããã<varname>oid</varname>ãåãåºãã¾ããæå¹ãª + <varname>oid</varname>ãããã°ããã®é¢æ°ã¯æ£ã®æ´æ°ãè¿ãã¾ãã㨠+ ã©ã¼ãèµ·ãã£ããã<function>pg_exec</function>ã§å®è¡ãããæå¾ã® + ã³ãã³ããSQLã®INSERTã§ãªãã£ãå ´åã¯-1ãè¿ãã¾ãã + </para> + <para> + <function>pg_exec</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -855,8 +975,13 @@ </funcprototype> </funcsynopsis> <para> - <function>pg_host</function>ã¯ãæå®ããPostgreSQLæ¥ç¶IDãæ¥ç¶ãã¦ãã - ãã¹ãã®ååãè¿ãã¾ãã + <function>pg_host</function>ã¯ãæå®ããPostgreSQL + <parameter>connection</parameter>ãªã½ã¼ã¹ãæ¥ç¶ãã¦ãããã¹ãã®å + åãè¿ãã¾ãã + </para> + <para> + <function>pg_connect</function>ããã³ + <function>pg_pconnect</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -1672,7 +1797,7 @@ <refnamediv> <refname>pg_get_result</refname> <refpurpose> - Get asynchronous query result + åæã¯ã¨ãªçµæãåå¾ãã </refpurpose> </refnamediv> <refsect1> @@ -1680,53 +1805,47 @@ <funcsynopsis> <funcprototype> <funcdef>resource <function>pg_get_result</function></funcdef> - <paramdef>resource <parameter><optional>connection</optional></parameter></paramdef> + <paramdef>resource + <parameter><optional>connection</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_get_result</function>ã¯ã + <function>pg_send_query</function>ã§å®è¡ããåæã¯ã¨ãªããçµæãª + ã½ã¼ã¹ãåå¾ãã¾ãã<function>pg_send_query</function>ã¯ãè¤æ°ã® + ã¯ã¨ãªãPostgreSQLãµã¼ãã«éä¿¡ãããã¨ãå¯è½ã§ããã¯ã¨ãªçµæã1 + ã¤ãã¤åå¾ããã«ã¯ã<function>pg_get_result</function>ã使ç¨ãã + ã¾ãããã®é¢æ°ã¯çµæãªã½ã¼ã¹ãè¿ãã¾ããçµæããããªãå ´åã«ã¯ã + &false;ãè¿ãã¾ãã </para> </refsect1> </refentry> - <refentry id='function.pg-request-cancel'> + <refentry id='function.pg-result-status'> <refnamediv> - <refname>pg_request_cancel</refname> + <refname>pg_result_status</refname> <refpurpose> - Cancel request + ã¯ã¨ãªçµæã®ã¹ãã¼ã¿ã¹ãåå¾ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>bool <function>pg_request_cancel</function></funcdef> - <paramdef>resource <parameter><optional>connection</optional></parameter></paramdef> + <funcdef>int <function>pg_result_status</function></funcdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_result_status</function>ã¯ãçµæãªã½ã¼ã¹ã®ã¹ãã¼ã¿ã¹ + ãè¿ãã¾ããè¿ãå¤ã¯ãPGSQL_EMPTY_QUERY, + PGSQL_COMMAND_OK, PGSQL_TUPLES_OK, PGSQL_COPY_TO, + PGSQL_COPY_FROM, PGSQL_BAD_RESPONSE, PGSQL_NONFATAL_ERROR, + PGSQL_FATAL_ERRORã®ã©ããã¨ãªãã¾ãã </para> - </refsect1> - </refentry> - - <refentry id='function.pg-is-busy'> - <refnamediv> - <refname>pg_is_busy</refname> - <refpurpose> - Get connection is busy or not - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>bool <function>pg_is_busy</function></funcdef> - <paramdef>resource <parameter><optional>connection</optional></parameter></paramdef> - </funcprototype> - </funcsynopsis> <para> - &warn.undocumented.func; + <function>pgsql_connection_status</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -1744,15 +1863,35 @@ <funcprototype> <funcdef>bool <function>pg_send_query</function></funcdef> <paramdef>resource <parameter>connection</parameter></paramdef> - <paramdef>string <parameter>qeury</parameter></paramdef> + <paramdef>string <parameter>query</parameter></paramdef> </funcprototype> <funcprototype> <funcdef>bool <function>pg_send_query</function></funcdef> - <paramdef>string <parameter>qeury</parameter></paramdef> + <paramdef>string <parameter>query</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_send_query</function> send asynchronous query to the + <parameter>connection</parameter>. Unlike + <function>pg_query</function>, it can send multiple query to + PostgreSQL and get the result one by one using + <function>pg_get_result</function>. Script execution is not block + while query is executing. Use + <function>pg_connection_busy</function> to check connection is + busy (i.e. query is executing) Query may be canceled by calling + <function>pg_cancel_query</function>. + </para> + <para> + Although, user can send multiple query at once. User cannot send + multiple query over busy connection. If query is sent while + connection is busy, it waits until last query is finished and + discards all result. + </para> + <para> + See also <function>pg_query</function>, + <function>pg_cancel_query</function>, + <function>pg_get_result</function> and + <function>pg_connection_busy</function> </para> </refsect1> </refentry> @@ -1761,7 +1900,7 @@ <refnamediv> <refname>pg_cancel_query</refname> <refpurpose> - ãªã¯ã¨ã¹ãããã£ã³ã»ã«ãã + åæã¯ã¨ãªãåãæ¶ã </refpurpose> </refnamediv> <refsect1> @@ -1773,7 +1912,14 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_cancel_query</function> cancel asynchronous query sent by + <function>pg_send_query</function>. You cannot cancel query executed by + <function>pg_query</function>. + </para> + <para> + See also <function>pg_send_query</function>, + <function>pg_cancel_result</function> and + <function>pg_connection_busy</function> </para> </refsect1> </refentry> @@ -1782,7 +1928,7 @@ <refnamediv> <refname>pg_connection_busy</refname> <refpurpose> - æ¥ç¶ããã¸ã¼ãã©ããã調ã¹ã + æ¥ç¶ããã¸ã¼ãã©ãã調ã¹ã </refpurpose> </refnamediv> <refsect1> @@ -1794,7 +1940,15 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_connection_busy</function> returns &true; if + connection busy. If connection is busy, previously sent query to + PostgreSQL server is still executing. If + <function>pg_get_result</function> is called, + <function>pg_get_result</function> will block. + </para> + <para> + See also <function>pg_connection_status</function> and + <function>pg_get_result</function> </para> </refsect1> </refentry> @@ -1815,7 +1969,15 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_connection_reset</function> reset connection with + the same parameter when connection is made. It is useful for + error recovery. It returns &true; if it resets connection + successfully, otherwise returns &false;. + </para> + <para> + See also <function>pg_connect</function>, + <function>pg_pconnect</function> and + <function>pg_connection_status</function> </para> </refsect1> </refentry> @@ -1832,11 +1994,16 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>pg_connection_status</function></funcdef> - <paramdef>resource <parameter>connnection</parameter></paramdef> + <paramdef>resource <parameter>connection</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_connection_status</function> returns a connection + status. Possible status is <literal>PGSQL_CONNECTION_O</literal> + or <literal>PGSQL_CONNECTION_BAD</literal>. + </para> + <para> + See also <function>pg_connection_busy</function> </para> </refsect1> </refentry> @@ -1845,7 +2012,7 @@ <refnamediv> <refname>pg_copy_from</refname> <refpurpose> - No description given yet + é åãããã¼ãã«ãã³ãã¼ãã </refpurpose> </refnamediv> <refsect1> @@ -1861,7 +2028,11 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_copy_from</function> copy table from array. It + return &true; for success, otherwise &false;. + </para> + <para> + See also <function>pg_copy_to</function> </para> </refsect1> </refentry> @@ -1870,7 +2041,7 @@ <refnamediv> <refname>pg_copy_to</refname> <refpurpose> - Send null-terminated string to backend server + é åã«ãã¼ãã«ãã³ãã¼ãã </refpurpose> </refnamediv> <refsect1> @@ -1885,7 +2056,12 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_copy_to</function> copy table to array. The result + array is returned if it success to copy. Otherwise it returns + &false;. + </para> + <para> + See also <function>pg_copy_from</function> </para> </refsect1> </refentry> @@ -1894,7 +2070,7 @@ <refnamediv> <refname>pg_escape_bytea</refname> <refpurpose> - Escape binary for bytea type + byteaåã«ãã¤ããªãã¨ã¹ã±ã¼ããã </refpurpose> </refnamediv> <refsect1> @@ -1906,7 +2082,16 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_escape_string</function>ã¯ãbyteaãã¼ã¿åç¨ã«æåå + ãã¨ã¹ã±ã¼ããã¾ãããã®é¢æ°ã¯ã¨ã¹ã±ã¼ããããæååãè¿ãã¾ãã + </para> + <note> + <para> + ãã®é¢æ°ã¯ãPostgreSQL 7.2以éãå¿ è¦ã¨ãã¾ãã + </para> + </note> + <para> + <function>pg_escape_string</function>ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -1915,7 +2100,7 @@ <refnamediv> <refname>pg_escape_string</refname> <refpurpose> - Escape string for text/char type + ããã¹ã/æååç¨ã®æååãã¨ã¹ã±ã¼ããã </refpurpose> </refnamediv> <refsect1> @@ -1927,28 +2112,16 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_escape_string</function> escapes string for + text/char datatype. It returns escaped string. </para> - </refsect1> - </refentry> - - <refentry id='function.pg-lo-close'> - <refnamediv> - <refname>pg_lo_close</refname> - <refpurpose> - Close a large object - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>bool <function>pg_lo_close</function></funcdef> - <paramdef>resource <parameter>large_object</parameter></paramdef> - </funcprototype> - </funcsynopsis> + <note> + <para> + This function is requires PostgreSQL 7.2 or later. + </para> + </note> <para> - &warn.undocumented.func; + See also <function>pg_escape_bytea</function> </para> </refsect1> </refentry> @@ -1957,7 +2130,7 @@ <refnamediv> <refname>pg_lo_seek</refname> <refpurpose> - Seeks position of large object + ã©ã¼ã¸ãªãã¸ã§ã¯ãã®ä½ç½®ãã·ã¼ã¯ãã </refpurpose> </refnamediv> <refsect1> @@ -1971,7 +2144,12 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_lo_seek</function> seeks position of large object + resource. <parameter>whence</parameter> is PGSQL_SEEK_SET, + PGSQL_SEEK_CUR or PGSQL_SEEK_END. + </para> + <para> + See also <function>pg_lo_tell</function>. </para> </refsect1> </refentry> @@ -1980,7 +2158,7 @@ <refnamediv> <refname>pg_lo_tell</refname> <refpurpose> - Returns current position of large object + ã©ã¼ã¸ãªãã¸ã§ã¯ãã®ã«ã¬ã³ãã®ä½ç½®ãè¿ã </refpurpose> </refnamediv> <refsect1> @@ -1992,7 +2170,11 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_lo_tell</function> returns current position (offset + from the beginning of large object). + </para> + <para> + See also <function>pg_lo_seek</function>. </para> </refsect1> </refentry> @@ -2001,7 +2183,7 @@ <refnamediv> <refname>pg_result_error</refname> <refpurpose> - Get error message associated with result + çµæã«é¢é£ããã¨ã©ã¼ã¡ãã»ã¼ã¸ãåå¾ãã </refpurpose> </refnamediv> <refsect1> @@ -2013,29 +2195,18 @@ </funcprototype> </funcsynopsis> <para> - &warn.undocumented.func; + <function>pg_result_error</function> returns error message + associated with <parameter>result</parameter> resource. Therefore, + user has better chance to get better error message than + <function>pg_last_error</function>. </para> - </refsect1> - </refentry> - - <refentry id='function.pg-result-status'> - <refnamediv> - <refname>pg_result_status</refname> - <refpurpose> - Get status of query result - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>pg_result_status</function></funcdef> - <paramdef>resource <parameter>result</parameter></paramdef> - </funcprototype> - </funcsynopsis> <para> - &warn.undocumented.func; - </para> + See also <function>pg_query</function>, + <function>pg_send_query</function>, + <function>pg_get_result</function>, + <function>pg_last_error</function> and + <function>pg_last_notice</function> + </para> </refsect1> </refentry> Index: phpdoc/ja/functions/posix.xml diff -u phpdoc/ja/functions/posix.xml:1.10 phpdoc/ja/functions/posix.xml:1.11 --- phpdoc/ja/functions/posix.xml:1.10 Wed Dec 12 15:53:34 2001 +++ phpdoc/ja/functions/posix.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.11 $ --> <reference id="ref.posix"> <title>POSIX 颿°</title> <titleabbrev>POSIX</titleabbrev> @@ -243,7 +244,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>posix_getgroups</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <para> Index: phpdoc/ja/functions/printer.xml diff -u phpdoc/ja/functions/printer.xml:1.5 phpdoc/ja/functions/printer.xml:1.6 --- phpdoc/ja/functions/printer.xml:1.5 Wed Dec 12 15:53:35 2001 +++ phpdoc/ja/functions/printer.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.6 $ --> <reference id="ref.printer"> <title>ããªã³ã¿é¢æ°</title> <titleabbrev>ããªã³ã¿</titleabbrev> @@ -41,8 +42,10 @@ <example> <title><function>printer_open</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open("HP Deskjet 930c"); $handle = printer_open(); +]]> </programlisting> </example> </refsect1> @@ -65,14 +68,17 @@ ãã®é¢æ°ã¯ãããªã³ã¿ã®ã¹ãã¼ã«ãã¡ã¤ã«ãåé¤ãã¾ãã </para> <para> - <parameter>handle</parameter> ã«ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ãæå®ããå¿ è¦ãããã¾ãã + <parameter>handle</parameter> ã«ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã + æå®ããå¿ è¦ãããã¾ãã </para> <example> <title><function>printer_abort</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_abort($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -93,7 +99,8 @@ </funcsynopsis> <para> ãã®é¢æ°ã¯ãããªã³ã¿ã¸ã®æ¥ç¶ãã¯ãã¼ãºãã¾ãã - <function>printer_close</function> ã¯ãã¢ã¯ãã£ããªããã¤ã¹ã³ã³ããã¹ãã¸ãã¯ãã¼ãºãã¾ãã + <function>printer_close</function> ã¯ãã¢ã¯ãã£ããªããã¤ã¹ã³ã³ã + ãã¹ãã¸ãã¯ãã¼ãºãã¾ãã </para> <para> <parameter>handle</parameter> ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ è¦ãããã¾ãã @@ -101,8 +108,10 @@ <example> <title><function>printer_close</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -123,17 +132,21 @@ </funcprototype> </funcsynopsis> <para> - <parameter>content</parameter> ãç´æ¥ããªã³ã¿ã«æ¸ãè¾¼ã¿ãæåæã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + <parameter>content</parameter> ãç´æ¥ããªã³ã¿ã«æ¸ãè¾¼ã¿ãæåæã« + &true;ã失æããå ´åã«&false;ãè¿ãã¾ãã </para> <para> - <parameter>handle</parameter> ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ è¦ãããã¾ãã + <parameter>handle</parameter> ã¯ãããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ã + ãå¿ è¦ãããã¾ãã </para> <example> <title><function>printer_write</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_write($handle, "Text to print"); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -161,7 +174,9 @@ <para> ãã®é¢æ°ã¯ãå©ç¨å¯è½ãªããªã³ã¿ã¨ãã®æ©è½ã調ã¹ã¾ãã <parameter>level</parameter>ã«ã¯ãæ å ±è¦æ±ã®ã¬ãã«ãè¨å®ãã¾ãã - ããã¯ã1,2,4 ã¾ã㯠5ã¨ãããã¨ãå¯è½ã§ãã<parameter>enumtype</parameter> ã¯æ¬¡ã®å®ç¾©æ¸ã¿ã®å®æ°ã®ã©ããã¨ããå¿ è¦ãããã¾ãã + ããã¯ã1,2,4 ã¾ã㯠5ã¨ãããã¨ãå¯è½ã§ãã + <parameter>enumtype</parameter> ã¯æ¬¡ã®å®ç¾©æ¸ã¿ã®å®æ°ã®ã©ããã¨ã + ãå¿ è¦ãããã¾ãã <itemizedlist> <listitem> <simpara> @@ -172,13 +187,16 @@ <listitem> <simpara> <parameter>PRINTER_ENUM_NAME</parameter>: - <parameter>name</parameter>ã®ãµã¼ãããã¡ã¤ã³ã¾ãã¯ããªã³ããããã¤ãã«ãªããã¨ãã§ãããã®ãæ°ãã¾ãã + <parameter>name</parameter>ã®ãµã¼ãããã¡ã¤ã³ã¾ãã¯ããªã³ãã + ããã¤ãã«ãªããã¨ãã§ãããã®ãæ°ãã¾ãã </simpara> </listitem> <listitem> <simpara> <parameter>PRINTER_ENUM_SHARED</parameter>: - ãã®ãã©ã¡ã¼ã¿ã¯åç¬ã§ã¯ä½¿ç¨ã§ãããä»ã®ãã©ã¡ã¼ã¿ãå ±æããªã³ã¿ãæ¤åºããããã®PRINTER_ENUM_LOCALãã¨ã¨ãã«ä½¿ç¨ããå¿ è¦ãããã¾ãã + ãã®ãã©ã¡ã¼ã¿ã¯åç¬ã§ã¯ä½¿ç¨ã§ãããä»ã®ãã©ã¡ã¼ã¿ãå ±æããªã³ + ã¿ãæ¤åºããããã®PRINTER_ENUM_LOCALãã¨ã¨ãã«ä½¿ç¨ããå¿ è¦ãã + ãã¾ãã </simpara> </listitem> <listitem> @@ -203,7 +221,8 @@ <listitem> <simpara> <parameter>PRINTER_ENUM_REMOTE</parameter>: - (WinNT/2000 ã®ã¿) ã³ã³ãã¥ã¼ã¿ã®ãã¡ã¤ã³ã«ãããããã¯ã¼ã¯ããªã³ã¿ã¨ããªã³ã¿ãµã¼ããæ°ãã¾ãã + (WinNT/2000 ã®ã¿) ã³ã³ãã¥ã¼ã¿ã®ãã¡ã¤ã³ã«ãããããã¯ã¼ã¯ã㪠+ ã³ã¿ã¨ããªã³ã¿ãµã¼ããæ°ãã¾ãã <parameter>level</parameter> ã 1ã®å ´åã®ã¿æå¹ã§ãã </simpara> </listitem> @@ -212,8 +231,10 @@ <example> <title><function>printer_list</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ /* ãã¼ã«ã«ãªå ±æããªã³ã¿ãæ¤åº */ var_dump( printer_list(PRINTER_ENUM_LOCAL | PRINTER_ENUM_SHARED) ); +]]> </programlisting> </example> </refsect1> @@ -440,10 +461,12 @@ <example> <title><function>printer_set_option</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_set_option($handle, PRINTER_SCALE, 75); printer_set_option($handle, PRINTER_TEXT_ALIGN, PRINTER_TA_LEFT); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -486,9 +509,11 @@ <example> <title><function>printer_get_option</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); print printer_get_option($handle, PRINTER_DRIVERVERSION); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -516,6 +541,7 @@ <example> <title><function>printer_create_dc</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle); printer_start_page($handle); @@ -537,6 +563,7 @@ printer_endpage($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -590,6 +617,7 @@ <example> <title><function>printer_start_doc</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -597,6 +625,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -790,6 +819,7 @@ <function>printer_select_pen</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -804,6 +834,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -938,6 +969,7 @@ <function>printer_select_brush</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -962,6 +994,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1115,6 +1148,7 @@ <function>printer_select_font</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1127,6 +1161,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1157,9 +1192,11 @@ <function>printer_logical_fontheight</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); print printer_logical_fontheight($handle, 72); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1213,6 +1250,7 @@ <title> <function>printer_draw_roundrect</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1231,6 +1269,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1277,6 +1316,7 @@ <function>printer_draw_rectangle</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1295,6 +1335,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1339,6 +1380,7 @@ <function>printer_draw_elipse</function> example </title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1357,6 +1399,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1388,6 +1431,7 @@ <example> <title><function>printer_draw_text</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1400,6 +1444,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1432,6 +1477,7 @@ <example> <title><function>printer_draw_line</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1447,6 +1493,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1513,6 +1560,7 @@ <example> <title><function>printer_draw_chord</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1531,6 +1579,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1596,6 +1645,7 @@ <example> <title><function>printer_draw_chord</function> example</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1614,6 +1664,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> @@ -1637,7 +1688,10 @@ </funcprototype> </funcsynopsis> <para> - ãã®é¢æ°ã¯ããããããã<parameter>filename</parameter>ã座æ¨<parameter>x</parameter>, <parameter>y</parameter>ã«æç»ãã¾ãã<parameter>handle</parameter>ã¯ããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ è¦ãããã¾ãã + ãã®é¢æ°ã¯ããããããã<parameter>filename</parameter>ãåº§æ¨ + <parameter>x</parameter>, <parameter>y</parameter>ã«æç»ãã¾ãã + <parameter>handle</parameter>ã¯ããªã³ã¿ã¸ã®æå¹ãªãã³ãã«ã§ããå¿ + è¦ãããã¾ãã </para> <para> ãã®é¢æ°ã¯æåæã«&true;ããã以å¤ã®å ´åã«&false;ãè¿ãã¾ãã @@ -1645,6 +1699,7 @@ <example> <title><function>printer_draw_bmp</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); @@ -1654,6 +1709,7 @@ printer_end_page($handle); printer_end_doc($handle); printer_close($handle); +]]> </programlisting> </example> </refsect1> Index: phpdoc/ja/functions/pspell.xml diff -u phpdoc/ja/functions/pspell.xml:1.12 phpdoc/ja/functions/pspell.xml:1.13 --- phpdoc/ja/functions/pspell.xml:1.12 Wed Dec 12 15:53:36 2001 +++ phpdoc/ja/functions/pspell.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.13 $ --> + +<!-- pspell currently (2001-08-14) doesn't use resources --> <reference id="ref.pspell"> <title>Pspell颿°</title> <titleabbrev>Pspell</titleabbrev> @@ -45,12 +48,14 @@ <example> <title><function>pspell_add_to_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); $pspell_link = pspell_new_config ($pspell_config); pspell_add_to_personal ($pspell_link, "Vlad"); pspell_save_wordlist ($pspell_link); +]]> </programlisting> </example> </para> @@ -90,7 +95,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>pspell_check</function></funcdef> + <funcdef>bool <function>pspell_check</function></funcdef> <paramdef>int <parameter>dictionary_link</parameter></paramdef> <paramdef>string <parameter>word</parameter></paramdef> </funcprototype> @@ -103,6 +108,7 @@ <example> <title><function>pspell_check</function></title> <programlisting role="php"> +<![CDATA[ $pspell_link = pspell_new ("en"); if (pspell_check ($pspell_link, "testt")) { @@ -110,6 +116,7 @@ } else { echo "Sorry, wrong spelling"; } +]]> </programlisting> </example> </para> @@ -139,6 +146,7 @@ <example> <title><function>pspell_add_to_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); $pspell_link = pspell_new_config ($pspell_config); @@ -146,6 +154,7 @@ pspell_add_to_personal ($pspell_link, "Vlad"); pspell_clear_session ($pspell_link); pspell_save_wordlist ($pspell_link); //"Vlad" ã¯ä¿åããã¾ããã +]]> </programlisting> </example> </para> @@ -242,10 +251,12 @@ <example> <title><function>pspell_config_create</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); $pspell_link = pspell_new_personal ($pspell_config, "en"); +]]> </programlisting> </example> </para> @@ -276,10 +287,12 @@ <example> <title><function>pspell_config_ignore</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_ignore($pspell_config, 5); $pspell_link = pspell_new_config($pspell_config); pspell_check($pspell_link, "abcd"); // ã¨ã©ã¼ãçãã¾ãã +]]> </programlisting> </example> </para> @@ -332,10 +345,12 @@ <example> <title><function>pspell_config_mode</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_mode($pspell_config, PSPELL_FAST); $pspell_link = pspell_new_config($pspell_config); pspell_check($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -373,10 +388,12 @@ <example> <title><function>pspell_config_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); $pspell_link = pspell_new_config ($pspell_config); pspell_check ($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -413,11 +430,13 @@ <example> <title><function>pspell_config_repl</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); $pspell_link = pspell_new_config ($pspell_config); pspell_check ($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -452,10 +471,12 @@ <example> <title><function>pspell_config_runtogether</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_runtogether ($pspell_config, true); $pspell_link = pspell_new_config ($pspell_config); pspell_check ($pspell_link, "thecat"); +]]> </programlisting> </example> </para> @@ -594,8 +615,10 @@ <example> <title><function>pspell_new</function></title> <programlisting role="php"> +<![CDATA[ $pspell_link = pspell_new ("en", "", "", "", (PSPELL_FAST | PSPELL_RUN_TOGETHER)); +]]> </programlisting> </example> </para> @@ -635,10 +658,12 @@ <example> <title><function>pspell_new_config</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); $pspell_link = pspell_new_personal ($pspell_config, "en"); +]]> </programlisting> </example> </para> @@ -762,8 +787,10 @@ <example> <title><function>pspell_new_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws", "en", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER)); +]]> </programlisting> </example> </para> @@ -797,12 +824,14 @@ <example> <title><function>pspell_add_to_personal</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/tmp/dicts/newdict"); $pspell_link = pspell_new_config ($pspell_config); pspell_add_to_personal ($pspell_link, "Vlad"); pspell_save_wordlist ($pspell_link); +]]> </programlisting> </example> </para> @@ -842,6 +871,7 @@ <example> <title><function>pspell_store_replacement</function></title> <programlisting role="php"> +<![CDATA[ $pspell_config = pspell_config_create ("en"); pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws"); pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl"); @@ -849,6 +879,7 @@ pspell_store_replacement ($pspell_link, $misspelled, $correct); pspell_save_wordlist ($pspell_link); +]]> </programlisting> </example> </para> @@ -877,15 +908,17 @@ <example> <title><function>pspell_suggest</function></title> <programlisting role="php"> -$pspell_link = pspell_new ("english"); +<![CDATA[ +$pspell_link = pspell_new ("en"); -if (!pspell_check ($pspell_link, "testt")){ +if (!pspell_check ($pspell_link, "testt")) { $suggestions = pspell_suggest ($pspell_link, "testt"); - for ($i=0; $i < count ($suggestions); $i++) { - echo "Possible spelling: " . $suggestions[$i] . "<br>"; + foreach ($suggestions as $suggestion) { + echo "Possible spelling: $suggestion<br>"; } } +]]> </programlisting> </example> </para> Index: phpdoc/ja/functions/readline.xml diff -u phpdoc/ja/functions/readline.xml:1.7 phpdoc/ja/functions/readline.xml:1.8 --- phpdoc/ja/functions/readline.xml:1.7 Wed Dec 12 15:53:37 2001 +++ phpdoc/ja/functions/readline.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <reference id="ref.readline"> <title>GNU Readline</title> <titleabbrev>Readline</titleabbrev> @@ -47,10 +48,11 @@ <example> <title><function>readline</function></title> <programlisting role="php"> +<![CDATA[ // ã¦ã¼ã¶ãã3åã³ãã³ããåå¾ -for ($i=0; $i < 3; $i++) { - $line = readline("Command: "); - readline_add_history($line); +for ($i=0; $i < 3; $i++) { + $line = readline ("Command: "); + readline_add_history ($line); } // ãã¹ããªããã³ã @@ -58,6 +60,7 @@ // 夿°ããã³ã print_r(readline_info()); +]]> </programlisting> </example> </refsect1> Index: phpdoc/ja/functions/recode.xml diff -u phpdoc/ja/functions/recode.xml:1.9 phpdoc/ja/functions/recode.xml:1.10 --- phpdoc/ja/functions/recode.xml:1.9 Wed Dec 12 15:53:37 2001 +++ phpdoc/ja/functions/recode.xml Sat Jan 26 10:38:34 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.recode"> <title>GNU Recode 颿°</title> <titleabbrev>Recode</titleabbrev> @@ -47,7 +48,9 @@ <example> <title>åºæ¬ç㪠<function>recode_string</function> ã®ä¾:</title> <programlisting role="php"> -print recode_string ("us..flat", "The following character has a diacritical mark: &aacute;"); +<![CDATA[ +print recode_string ("us..flat", "The following character has a diacritical mark: á"); +]]> </programlisting> </example> </para> @@ -109,9 +112,11 @@ <example> <title>åºæ¬ç㪠<function>recode_file</function> ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $input = fopen ('input.txt', 'r'); $output = fopen ('output.txt', 'w'); -recode_file ("us..flat", $input, $output); +recode_file ("us..flat", $input, $output); +]]> </programlisting> </example> </para> Index: phpdoc/ja/functions/regex.xml diff -u phpdoc/ja/functions/regex.xml:1.14 phpdoc/ja/functions/regex.xml:1.15 --- phpdoc/ja/functions/regex.xml:1.14 Wed Dec 12 15:53:37 2001 +++ phpdoc/ja/functions/regex.xml Sat Jan 26 10:38:34 2002 @@ -1,49 +1,63 @@ <?xml version="1.0" encoding="utf-8"?> <reference id="ref.regex"> - <title>æ£è¦è¡¨ç¾é¢æ° (POSIXæ¡å¼µãµãã¼ã)</title> +<!-- $Revision: 1.15 $ --> + <title>æ£è¦è¡¨ç¾(regex)颿° (POSIXæ¡å¼µãµãã¼ã)</title> <titleabbrev>Regexps</titleabbrev> <partintro> + <note> + <para> + PHPã¯ã<link linkend="ref.pcre">PCRE颿°</link>ã«ããPerläºæã®æ§ + æã使ç¨ããæ£è¦è¡¨ç¾å¼ããµãã¼ããã¾ãããããã®é¢æ°ã¯ã貪欲ã§ãª + ãããããè¨æãæ¡ä»¶ä»ããµããã¿ã¼ã³ãããã¦POSIXæ¡å¼µæ£è¦è¡¨ç¾æ§æ + ã§ãµãã¼ãããã¦ããªãä»ã®è¤æ°ã®æ©è½ããµãã¼ããã¾ãã + </para> + </note> + <warning> + <para> + ãããã®æ£è¦è¡¨ç¾é¢æ°ã¯ãã¤ããªã»ã¼ãã§ã¯ããã¾ããã<link + linkend="ref.pcre">PCRE颿°</link>ã¯ãã¤ããªã»ã¼ãã§ãã + </para> + </warning> <para> PHPã«ããã¦æ£è¦è¡¨ç¾ã¯è¤éãªæååæä½ã«ä½¿ç¨ããã¾ãã æ¬¡ã®æ£è¦è¡¨ç¾é¢æ°ããµãã¼ãããã¾ãã <itemizedlist> + <listitem> + <simpara><function>ereg</function></simpara> + </listitem> + <listitem> + <simpara><function>ereg_replace</function></simpara> + </listitem> <listitem> - <simpara><function>ereg</function></simpara> - </listitem> - <listitem> - <simpara><function>ereg_replace</function></simpara> - </listitem> - <listitem> - <simpara><function>eregi</function></simpara> - </listitem> - <listitem> - <simpara><function>eregi_replace</function></simpara> - </listitem> - <listitem> - <simpara><function>split</function></simpara> - </listitem> - <listitem> - <simpara><function>spliti</function></simpara> - </listitem> - </itemizedlist> + <simpara><function>eregi</function></simpara> + </listitem> + <listitem> + <simpara><function>eregi_replace</function></simpara> + </listitem> + <listitem> + <simpara><function>split</function></simpara> + </listitem> + <listitem> + <simpara><function>spliti</function></simpara> + </listitem> + </itemizedlist> ãããã®é¢æ°ã¯ãå ¨ã¦æåã®å¼æ°ã«æ£è¦è¡¨ç¾ãã¨ãã¾ãã PHPã¯POSIX 1003.2ã§å®ç¾©ãããPOSIXæ¡å¼µæ£è¦è¡¨ç¾ã使ç¨ãã¾ãã POSIXæ£è¦è¡¨ç¾ã«é¢ãã詳細ã«ã¤ãã¦ã¯ãPHPé å¸ãã¡ã¤ã«ã®regexãã£ã¬ ã¯ããªã«ããregexã®manãã¼ã¸ãåç §ä¸ããã ãã®ãã¼ã¸ã¯manpageãã©ã¼ãããã§ãããèªãã«ã¯ <command>man /usr/local/src/regex/regex.7</command>ã®ããã«ãã¾ãã - - <!-- Should add discussion of PCRE functions here. --></para> - + </para> <para> <example> <title>æ£è¦è¡¨ç¾ã®ä¾</title> <programlisting role="php"> -ereg ("abc", $string); -/* "abc"ã$stringã®ã©ããã«ããå ´åã«trueãè¿ã */ +<![CDATA[ +ereg ("abc", $string); +/* "abc"ã$stringã®ã©ããã«ããå ´åã«trueãè¿ã */ -ereg ("^abc", $string); +ereg ("^abc", $string); /* "abc" ã$stringã®æåã«ããå ´åã«trueãè¿ã */ ereg ("abc$", $string); @@ -56,14 +70,15 @@ /* 空ç½ã§åºåããã3ã¤åèªã $regs[1], $regs[2],$regs[3]ã«ä»£å ¥ãã */ -$string = ereg_replace ("^", "<BR>", $string); +$string = ereg_replace ("^", "<br />", $string); /* <BR> ã¿ã°ã $string ã®å é ã«æ¿å ¥ãã */ -$string = ereg_replace ("$", "<BR>", $string); +$string = ereg_replace ("$", "<br />", $string); /* <BR> ã¿ã°ã $string ã®æå¾ã«æ¿å ¥ãã */ $string = ereg_replace ("\n", "", $string); /* $stringã®æ¹è¡æåãå ¨ã¦åãé¤ã */ +]]> </programlisting> </example> </para> @@ -101,14 +116,17 @@ ã¨ãã£ãããã«ãªã£ã¦ãã¾ãã$regs[0]㯠<parameter>string</parameter>ã®ã³ãã¼ãä¿æãã¦ãã¾ãã </simpara> - <simpara> - <function>ereg</function>ãä½ãã«å®å ¨ã«ãããããå ´åã$regs ã«ã¯ - ã¡ããã©10åã®è¦ç´ ãä»£å ¥ããã¾ããããã¯ãæ¬å¼§ã§æ¬ãããé¨åæå - åã®ãã¡ãå®éã«ããããããã®ã 10 ããå°ãªãã¦ãå¤ãã¦ãåæ§ã§ - ãããã ãã<function>ereg</function>ã«ã¯ããå¤ãã®é¨åæååã«ãã - ãããè½åãããã¾ããããããããã®ãè¦ä»ãããªãã£ãå ´åã$regs - ã¯ã<function>ereg</function>ã«ããæ¸ãæãããã¾ããã - </simpara> + <note> + <simpara> + PHP 4.1.0ããåã®ãã¼ã¸ã§ã³ã§ã¯ã<literal>$regs</literal>ã«ã¯ã¡ã + ãã©10åã®è¦ç´ ãä»£å ¥ããã¾ãããããã¯ãå®éã«ãããããæ¬å¼§ä»ã + ã®ãµãæååã10ããå¤ãã¦ãå°ãªãã¦ãåãã§ããããã ãã + <function>ereg</function>ã«ã¯ããå¤ãã®é¨åæååã«ãããããè½ + åãããã¾ããããããããã®ãè¦ä»ãããªãã£ãå ´åã + <literal>$regs</literal>ã¯ã<function>ereg</function>ã«ããæ¸ã + æãããã¾ããã + </simpara> + </note> <simpara> æ¤ç´¢ã«ããã¦ã¯ã大æåã¨å°æåãåºå¥ãã¾ãã </simpara> @@ -123,17 +141,20 @@ <example> <title><function>ereg</function>ã®ä¾</title> <programlisting role="php"> -if ( ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) { +<![CDATA[ +if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) { echo "$regs[3].$regs[2].$regs[1]"; } else { - echo "æ¥ä»ã®ãã©ã¼ãããã䏿£ã§ãï¼$date"; + echo "Invalid date format: $date"; } +]]> </programlisting> </example> </para> <simpara> <function>eregi</function>,<function>ereg_replace</function>, - <function>eregi_replace</function>ãåç §ä¸ããã + <function>eregi_replace</function>,<function>preg_match</function> + ãåç §ä¸ããã </simpara> </refsect1> </refentry> @@ -153,6 +174,13 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + <note> + <para> + Perläºæã®æ£è¦è¡¨ç¾æ§æã使ç¨ãã + <function>preg_replace</function>ã¯ããã°ãã° + <function>ereg_replace</function>ãããéã代æ¿é¢æ°ã§ãã + </para> + </note> <simpara> ãã®é¢æ°ã¯ã<parameter>string</parameter>ãã¹ãã£ã³ã㦠<parameter>pattern</parameter>ã«ããããããã®ãæ¢ãã @@ -183,10 +211,12 @@ <example> <title><function>ereg_replace</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $string = "This is a test"; -echo ereg_replace ( " is", " was", $string ); -echo ereg_replace ( "( )is", "\\1was", $string ); -echo ereg_replace ( "(( )is)", "\\2was", $string ); +echo ereg_replace (" is", " was", $string); +echo ereg_replace ("( )is", "\\1was", $string); +echo ereg_replace ("(( )is)", "\\2was", $string); +]]> </programlisting> </example> </para> @@ -199,7 +229,8 @@ <example> <title><function>ereg_replace</function> ã®ä¾</title> <programlisting> -<?php +<![CDATA[ +<?php /* ããã¯æå¾ ããéãã«åä½ãã¾ããã */ $num = 4; $string = "This string has four words."; @@ -212,17 +243,29 @@ $string = ereg_replace('four', $num, $string); echo $string; /* åºå: 'This string has 4 words.' */ ?> +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>URLããªã³ã¯ã§ç½®æãã</title> + <programlisting role="php"> +<![CDATA[ +$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", + "<a href=\"\\0\">\\0</a>", $text); +]]> </programlisting> </example> </para> <simpara> <function>ereg</function>, <function>eregi</function>, - <function>eregi_replace</function>ãåç §ä¸ããã + <function>eregi_replace</function>, <function>str_replace</function>, + <function>preg_match</function>ãåç §ä¸ããã </simpara> </refsect1> </refentry> - <refentry id="function.eregi"> <refnamediv> <refname>eregi</refname> @@ -248,15 +291,24 @@ ãã®é¢æ°ã¯ãã¢ã«ãã¡ãããæåããããã³ã°ãããé㫠大æåå°æåã®åºå¥ãããªããã¨ä»¥å¤ã¯<function>ereg</function>ã¨å ãã§ãã + <example> + <title><function>eregi</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +if (eregi("z", $string)) { + echo "'$string' contains a 'z' or 'Z'!"; +} +]]> + </programlisting> + </example> </para> <para> - <function>ereg</function>, <function>ereg_replace</function> - ããã³<function>eregi_replace</function>ãåç §ä¸ããã + <function>ereg</function>, <function>ereg_replace</function>, + <function>eregi_replace</function>ãåç §ä¸ããã </para> </refsect1> </refentry> - <refentry id="function.eregi-replace"> <refnamediv> <refname>eregi_replace</refname> @@ -303,6 +355,13 @@ </paramdef> </funcprototype> </funcsynopsis> + <note> + <para> + Perläºæã®æ£è¦è¡¨ç¾æ§æã使ç¨ãã<function>preg_split</function> + ã¯ãå¾ã ã«ãã¦<function>split</function>ãããéãä»£æ¿æ¡ã¨ãªãã¾ + ãã + </para> + </note> <para> æååã®é åãè¿ãã¾ããé åã®åè¦ç´ ã¯æ£è¦è¡¨ç¾ <parameter>pattern</parameter>ã«ããåºåããã @@ -319,19 +378,33 @@ <example> <title><function>split</function>ã®ä¾</title> <programlisting role="php"> -$passwd_list = split ( ":", $passwd_line, 5 ); +<![CDATA[ +list($user,$pass,$uid,$gid,$extra)= split (":", $passwd_line, 5); +]]> </programlisting> </example> </para> + <tip> + <simpara> + <parameter>pattern</parameter>ã<replaceable>n</replaceable>åç¾ + ããå ´åãè¿ãããé åã«ã¯ã + <literal><replaceable>n</replaceable>+1</literal>åã®ã¢ã¤ãã ã + å«ã¾ãã¾ããä¾ãã°ã<parameter>pattern</parameter>ãç¾ããªãå ´åã + 1åã®è¦ç´ ã®ã¿ãæããé åãè¿ããã¾ãããã¡ããããã㯠+ <parameter>string</parameter>ã空ã®å ´åãåæ§ã§ãã + </simpara> + </tip> <para> ã¹ã©ãã·ã¥ããããããã¤ãã³ãããªãã¿ã¨ããã¨æ¥ä»ãå¦çããä¾ã 以ä¸ã«ç¤ºãã¾ãã <example> <title><function>split</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ $date = "04/30/1973"; // ããªãã¿ã¯ã¹ã©ãã·ã¥ããããããã¤ãã³ã®ã©ããã§ãã list ($month, $day, $year) = split ('[/.-]', $date); -echo "Month: $month; Day: $day; Year: $year<br>\n"; +echo "Month: $month; Day: $day; Year: $year<br>\n"; +]]> </programlisting> </example> </para> @@ -361,9 +434,10 @@ <command>man /usr/local/src/regex/regex.7</command>ã®ããã«ãã¾ãã </para> <para> - <function>preg_split</function>, - <function>spliti</function>,<function>explode</function>, - <function>implode</function>ãåç §ä¸ããã + <function>preg_split</function>, <function>spliti</function>, + <function>explode</function>, <function>implode</function>, + <function>chunk_split</function>, <function>wordwrap</function>ã + åç §ä¸ããã </para> </refsect1> </refentry> @@ -425,7 +499,9 @@ <example> <title><function>sql_regcase</function>ã®ä¾</title> <programlisting role="php"> +<![CDATA[ echo sql_regcase ("Foo bar"); +]]> </programlisting> </example> ããã¯ã<screen>[Ff][Oo][Oo] [Bb][Aa][Rr]</screen>ã¨è¡¨ç¤ºãã¾ãã @@ -437,7 +513,6 @@ </para> </refsect1> </refentry> - </reference> @@ -457,4 +532,7 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 -->