cvs: phpdoc-kr /reference/bc/functions bcadd.xml bccomp.xml bcdiv.xml bcmod.xml bcmul.xml bcpow.xml bcpowmod.xml bcscale.xml bcsqrt.xml bcsub.xml
/reference/pcre pattern.syntax.xml

From: Date: Thu, 04 Dec 2008 23:28:39 +0000
Subject: cvs: phpdoc-kr /reference/bc/functions bcadd.xml bccomp.xml bcdiv.xml bcmod.xml bcmul.xml bcpow.xml bcpowmod.xml bcscale.xml bcsqrt.xml bcsub.xml
/reference/pcre pattern.syntax.xml
Groups: php.doc.kr 
Request: Send a blank email to doc-kr+get-804@lists.php.net to get a copy of this message
progcom Thu Dec 4 23:28:39 2008 UTC Modified files: /phpdoc-kr/reference/bc/functions bcadd.xml bccomp.xml bcdiv.xml bcmod.xml bcmul.xml bcpow.xml bcpowmod.xml bcscale.xml bcsqrt.xml bcsub.xml /phpdoc-kr/reference/pcre pattern.syntax.xml Log: sync

http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcadd.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcadd.xml diff -u phpdoc-kr/reference/bc/functions/bcadd.xml:1.5 phpdoc-kr/reference/bc/functions/bcadd.xml:1.6 --- phpdoc-kr/reference/bc/functions/bcadd.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bcadd.xml Thu Dec 4 23:28:38 2008 @@ -1,29 +1,86 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcadd" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcadd</refname> - <refpurpose>두개의 임의 정확도 수를 더한다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcadd</methodname> - <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> - <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>left_operand</parameter>를 - <parameter>right_operand</parameter>와 더하고 결과를 문자열로 반환한다. - 선택적인 <parameter>scale</parameter> 인수는 결과값에서 소수점 이하의 - 자릿수를 정하는데 사용된다. - </para> - <para> - <function>bcsub</function> 참고. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.8 Maintainer: progcom Status: ready --> +<refentry xml:id="function.bcadd" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcadd</refname> + <refpurpose>두 임의 정밀도 수 더하기</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcadd</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>left_operand</parameter>와 + <parameter>right_operand</parameter>의 합. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>right_operand</parameter></term> + <listitem> + <para> + 오른쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + &bc.scale.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 두 연산수의 합, 문자열. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bcadd</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$a = '1.234'; +$b = '5'; + +echo bcadd($a, $b); // 6 +echo bcadd($a, $b, 4); // 6.2340 + +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcsub</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bccomp.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/bc/functions/bccomp.xml diff -u phpdoc-kr/reference/bc/functions/bccomp.xml:1.5 phpdoc-kr/reference/bc/functions/bccomp.xml:1.6 --- phpdoc-kr/reference/bc/functions/bccomp.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bccomp.xml Thu Dec 4 23:28:38 2008 @@ -1,29 +1,85 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bccomp" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bccomp</refname> - <refpurpose>두개의 임의 정확도 수를 비교한다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>int</type><methodname>bccomp</methodname> - <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> - <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>left_operand</parameter>를 - <parameter>right_operand</parameter>와 비교하고 결과값을 정수로 반환한다. - 선택적인 <parameter>scale</parameter> 인수는 비교시 사용되는 소수점 이하 - 자릿수를 설정하는데 사용된다. 두 수가 같으면 0의 결과값을 반환한다. - <parameter>left_operand</parameter>가 <parameter>right_operand</parameter> 보다 - 크면 +1을 반환하고, <parameter>left_operand</parameter>가 - <parameter>right_operand</parameter> 보다 작으면 -1을 반환한다. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.7 Maintainer: progcom Status: ready --> +<!-- CREDITS: fuzzy74 --> +<refentry xml:id="function.bccomp" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bccomp</refname> + <refpurpose>두 임의 정밀도 수 비교</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>bccomp</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>left_operand</parameter>와 + <parameter>right_operand</parameter>를 비교하고 결과를 정수로 반환합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>right_operand</parameter></term> + <listitem> + <para> + 오른쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>scale</parameter></term> + <listitem> + <para> + 선택적인 <parameter>scale</parameter> 인수는 비교에 사용할 소수점 아래 + 자리수를 설정합니다. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 두 연산수가 같으면 0을, <parameter>left_operand</parameter>가 + <parameter>right_operand</parameter>보다 크면 1, 작으면 -1을 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bccomp</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php + +echo bccomp('1', '2') . "\n"; // -1 +echo bccomp('1.00001', '1', 3); // 0 +echo bccomp('1.00001', '1', 5); // 1 + +?> +]]> + </programlisting> + </example> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcdiv.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcdiv.xml diff -u phpdoc-kr/reference/bc/functions/bcdiv.xml:1.5 phpdoc-kr/reference/bc/functions/bcdiv.xml:1.6 --- phpdoc-kr/reference/bc/functions/bcdiv.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bcdiv.xml Thu Dec 4 23:28:38 2008 @@ -1,28 +1,83 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcdiv" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcdiv</refname> - <refpurpose>두개의 임의 정확도 수를 나눈다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcdiv</methodname> - <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> - <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>left_operand</parameter>를 <parameter>right_operand</parameter>로 - 나누고 결과값을 반환한다. 선택적인 <parameter>scale</parameter> 인수는 - 결과값의 소수점 이하 자릿수를 결정하는데 사용된다. - </para> - <para> - <function>bcmul</function> 참고. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.9 Maintainer: progcom Status: ready --> +<refentry xml:id="function.bcdiv" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcdiv</refname> + <refpurpose>두 임의 정밀도 수 나누기</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcdiv</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>left_operand</parameter>를 + <parameter>right_operand</parameter>로 나눕니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>right_operand</parameter></term> + <listitem> + <para> + 오른쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + &bc.scale.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 나눗셈의 결과를 문자열로 반환하거나, <parameter>right_operand</parameter>가 + 0이면 &null;을 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bcdiv</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php + +echo bcdiv('105', '6.55957', 3); // 16.007 + +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcmul</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcmod.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcmod.xml diff -u phpdoc-kr/reference/bc/functions/bcmod.xml:1.4 phpdoc-kr/reference/bc/functions/bcmod.xml:1.5 --- phpdoc-kr/reference/bc/functions/bcmod.xml:1.4 Sat Jun 23 13:51:37 2007 +++ phpdoc-kr/reference/bc/functions/bcmod.xml Thu Dec 4 23:28:38 2008 @@ -1,28 +1,80 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcmod" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcmod</refname> - <refpurpose> - 임의 정확도 수의 나머지를 구한다 - </refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcmod</methodname> - <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> - <methodparam><type>string</type><parameter>modulus</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>modulus</parameter>로 - <parameter>left_operand</parameter>를 나눈 나머지를 구한다. - </para> - <para> - <function>bcdiv</function> 참고. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.8 Maintainer: progcom Status: ready --> +<refentry xml:id="function.bcmod" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcmod</refname> + <refpurpose>임의 정밀도 수의 나머지를 구합니다</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcmod</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>modulus</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>modulus</parameter>를 사용하여 + <parameter>left_operand</parameter>의 나머지를 구합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>modulus</parameter></term> + <listitem> + <para> + 제수, 문자열. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 나머지를 문자열로 반환하거나, <parameter>modulus</parameter>가 0이면 + &null;을 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bcmod</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php +echo bcmod('4', '2'); // 0 +echo bcmod('2', '4'); // 2 +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcdiv</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcmul.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcmul.xml diff -u phpdoc-kr/reference/bc/functions/bcmul.xml:1.5 phpdoc-kr/reference/bc/functions/bcmul.xml:1.6 --- phpdoc-kr/reference/bc/functions/bcmul.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bcmul.xml Thu Dec 4 23:28:38 2008 @@ -1,28 +1,81 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcmul" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcmul</refname> - <refpurpose>두개의 임의 정확도 수를 곱한다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcmul</methodname> - <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> - <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>left_operand</parameter>를 <parameter>right_operand</parameter>와 - 곱하고 결과값을 반환한다. 선택적인 <parameter>scale</parameter> 인수는 - 결과값의 소수점이하 자릿수를 결정한다. - </para> - <para> - <function>bcdiv</function> 참고. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.9 Maintainer: progcom Status: ready --> +<refentry xml:id="function.bcmul" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcmul</refname> + <refpurpose>두 임의 정밀도 수 곱하기</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcmul</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>left_operand</parameter>를 + <parameter>right_operand</parameter>로 곱합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>right_operand</parameter></term> + <listitem> + <para> + 오른쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + &bc.scale.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 결과를 문자열로 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bcmul</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php +echo bcmul('1.34747474747', '35', 3); // 47.161 +echo bcmul('2', '4'); // 8 +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcdiv</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcpow.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcpow.xml diff -u phpdoc-kr/reference/bc/functions/bcpow.xml:1.7 phpdoc-kr/reference/bc/functions/bcpow.xml:1.8 --- phpdoc-kr/reference/bc/functions/bcpow.xml:1.7 Sun Nov 23 17:19:38 2008 +++ phpdoc-kr/reference/bc/functions/bcpow.xml Thu Dec 4 23:28:38 2008 @@ -4,7 +4,7 @@ <refentry xml:id="function.bcpow" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>bcpow</refname> - <refpurpose>임의 정밀도 수를 거듭제곱</refpurpose> + <refpurpose>임의 정밀도 수 거듭제곱</refpurpose> </refnamediv> <refsect1 role="description"> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcpowmod.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcpowmod.xml diff -u phpdoc-kr/reference/bc/functions/bcpowmod.xml:1.4 phpdoc-kr/reference/bc/functions/bcpowmod.xml:1.5 --- phpdoc-kr/reference/bc/functions/bcpowmod.xml:1.4 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bcpowmod.xml Thu Dec 4 23:28:38 2008 @@ -1,60 +1,113 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.3 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcpowmod" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcpowmod</refname> - <refpurpose> - Raise an arbitrary precision number to another, reduced by a specified modulus. - 임의 정밀도 수를 계수에 의해 감소하는 다른 수로 제곱한다. - </refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcpowmod</methodname> - <methodparam><type>string</type><parameter>x</parameter></methodparam> - <methodparam><type>string</type><parameter>y</parameter></methodparam> - <methodparam><type>string</type><parameter>modulus</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <simpara> - <parameter>x</parameter> 를 계수 <parameter>modulus</parameter>와 관련된 - <parameter>y</parameter> 제곱하기 위한 고속-멱법(fast-exponentiation) 기법을 - 사용한다. 선택적인 <parameter>scale</parameter> 인수는 소수점 이하 자릿수를 - 설정하는데 사용된다. - </simpara> - <para> - 다음 두 구문은 기능상 동일하다. - 하지만 <function>bcpowmod</function> 버전은 좀더 짧은 시간에 수행되고 - 더 긴 인수를 허용한다. - <informalexample> - <programlisting role="php"> +<!-- EN-Revision: 1.10 Maintainer: progcom Status: ready --> +<!-- CREDITS: fuzzy74 --> +<refentry xml:id="function.bcpowmod" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcpowmod</refname> + <refpurpose>임의 정밀도 수를 거듭제곱하고, 지정한 제수로 나머지를 구합니다</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcpowmod</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>modulus</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>left_operand</parameter>의 + <parameter>right_operand</parameter>승에 대한 + <parameter>modulus</parameter>의 나머지를 구하기 위한 빠른 누승법을 + 사용합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>right_operand</parameter></term> + <listitem> + <para> + 오른쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>modulus</parameter></term> + <listitem> + <para> + 제수, 문자열. + </para> + </listitem> + </varlistentry> + &bc.scale.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 결과를 문자열로 반환하거나, <parameter>modulus</parameter>가 0이면 &null;을 + 반환합니다. + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + 이 방법은 나머지 연산을 사용하기에, 자연수가 아닌 수는 예측할 수 없는 + 결과를 가져옵니다. 자연수는 0이 아닌 양의 정수입니다. + </para> + </note> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + 다음 두 구문은 기능상 동일합니다. + 그러나 <function>bcpowmod</function> 버전이 짧은 시간에 수행되고 + 더 큰 인수를 허용합니다. + <informalexample> + <programlisting role="php"> <![CDATA[ <?php -$a = bcpowmod($x,$y,$mod); +$a = bcpowmod($x, $y, $mod); + +$b = bcmod(bcpow($x, $y), $mod); -$b = bcmod(bcpow($x,$y),$mod); +// $a와 $b는 동일합니다. -/* $a and $b are equal to each other. */ ?> ]]> - </programlisting> - </informalexample> - </para> - <para> - <note> - <simpara> - 이 방식은 계수 연산을 사용하기 때문에, 자연수가 아닌 수를 사용하면 - 기대하지 않은 결과를 낼수 있다. 자연수는 0이 아닌 양의 정수이다. - </simpara> - </note> - </para> - <para> - <function>bcpow</function>, - <function>bcmod</function> 참고. - </para> - </refsect1> - </refentry> + </programlisting> + </informalexample> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcpow</function></member> + <member><function>bcmod</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcscale.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcscale.xml diff -u phpdoc-kr/reference/bc/functions/bcscale.xml:1.7 phpdoc-kr/reference/bc/functions/bcscale.xml:1.8 --- phpdoc-kr/reference/bc/functions/bcscale.xml:1.7 Sun Nov 23 17:19:38 2008 +++ phpdoc-kr/reference/bc/functions/bcscale.xml Thu Dec 4 23:28:38 2008 @@ -4,7 +4,7 @@ <refentry xml:id="function.bcscale" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>bcscale</refname> - <refpurpose>모든 bc 수학 함수의 기본 scale 인수값을 설정</refpurpose> + <refpurpose>모든 bc 수학 함수의 기본 scale 인수값 설정</refpurpose> </refnamediv> <refsect1 role="description"> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcsqrt.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcsqrt.xml diff -u phpdoc-kr/reference/bc/functions/bcsqrt.xml:1.5 phpdoc-kr/reference/bc/functions/bcsqrt.xml:1.6 --- phpdoc-kr/reference/bc/functions/bcsqrt.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bcsqrt.xml Thu Dec 4 23:28:38 2008 @@ -1,29 +1,73 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcsqrt</refname> - <refpurpose> - 임의 정확도 수의 제곱근을 구한다 - </refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcsqrt</methodname> - <methodparam><type>string</type><parameter>operand</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>operand</parameter>의 제곱근을 반환한다. - 선택적인 <parameter>scale</parameter> 인수는 결과값의 소수점 이하 - 자릿수를 설정한다. - </para> - <para> - <function>bcpow</function> 참고. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.9 Maintainer: progcom Status: ready --> +<refentry xml:id="function.bcsqrt" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcsqrt</refname> + <refpurpose>임의 정밀도 수의 제곱근을 구합니다</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcsqrt</methodname> + <methodparam><type>string</type><parameter>operand</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>operand</parameter>의 제곱근을 반환합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>operand</parameter></term> + <listitem> + <para> + 연산수, 문자열. + </para> + </listitem> + </varlistentry> + &bc.scale.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 제곱근을 문자열로 반환하거나, <parameter>operand</parameter>가 음수이면 + &null;을 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bcsqrt</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php + +echo bcsqrt('2', 3); // 1.414 + +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcpow</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/bc/functions/bcsub.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/bc/functions/bcsub.xml diff -u phpdoc-kr/reference/bc/functions/bcsub.xml:1.5 phpdoc-kr/reference/bc/functions/bcsub.xml:1.6 --- phpdoc-kr/reference/bc/functions/bcsub.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/bc/functions/bcsub.xml Thu Dec 4 23:28:38 2008 @@ -1,30 +1,86 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.bcsub" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>bcsub</refname> - <refpurpose> - 임의 정확도 수를 다른 임의 정확도 수에서 뺀다 - </refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>bcsub</methodname> - <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> - <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> - </methodsynopsis> - <para> - <parameter>right_operand</parameter>를 <parameter>left_operand</parameter>에서 - 빼고 결과값을 문자열로 반환한다. 선택적인 <parameter>scale</parameter> 인수는 - 소수점 이하 자릿수를 설정하는데 사용된다. - </para> - <para> - <function>bcadd</function> 참고. - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.8 Maintainer: progcom Status: ready --> +<refentry xml:id="function.bcsub" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>bcsub</refname> + <refpurpose>임의 정밀도 수 빼기</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>bcsub</methodname> + <methodparam><type>string</type><parameter>left_operand</parameter></methodparam> + <methodparam><type>string</type><parameter>right_operand</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>scale</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>left_operand</parameter>에서 + <parameter>right_operand</parameter>를 뺍니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>left_operand</parameter></term> + <listitem> + <para> + 왼쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>right_operand</parameter></term> + <listitem> + <para> + 오른쪽 연산수, 문자열. + </para> + </listitem> + </varlistentry> + &bc.scale.description; + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 뺄셈의 결과, 문자열. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><function>bcsub</function> 예제</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$a = '1.234'; +$b = '5'; + +echo bcsub($a, $b); // -3 +echo bcsub($a, $b, 4); // -3.7660 + +?> +]]> + </programlisting> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>bcadd</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/pcre/pattern.syntax.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-kr/reference/pcre/pattern.syntax.xml diff -u phpdoc-kr/reference/pcre/pattern.syntax.xml:1.6 phpdoc-kr/reference/pcre/pattern.syntax.xml:1.7 --- phpdoc-kr/reference/pcre/pattern.syntax.xml:1.6 Mon Nov 10 20:51:23 2008 +++ phpdoc-kr/reference/pcre/pattern.syntax.xml Thu Dec 4 23:28:38 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.21 Maintainer: progcom Status: working --> +<!-- EN-Revision: 1.22 Maintainer: progcom Status: wip --> <chapter xml:id="reference.pcre.pattern.syntax" xmlns="http://docbook.org/ns/docbook"> <title>패턴 문법</title> <titleabbrev>PCRE 정규표현식 문법 설명</titleabbrev> @@ -36,7 +36,7 @@ <variablelist> <varlistentry> <term><emphasis>\</emphasis></term> - <listitem><simpara>여러가지로 사용하는 일반적인 이스케이프 문자</simpara></listitem> + <listitem><simpara>여러가지로 사용하는 일반적인 회피 문자</simpara></listitem> </varlistentry> <varlistentry> <term><emphasis>^</emphasis></term> @@ -98,7 +98,7 @@ <variablelist> <varlistentry> <term><emphasis>\</emphasis></term> - <listitem><simpara>일반적인 이스케이프 문자</simpara></listitem> + <listitem><simpara>일반적인 회피 문자</simpara></listitem> </varlistentry> <varlistentry> <term><emphasis>^</emphasis></term> @@ -123,7 +123,7 @@ <para> 백슬래시 문자는 여러가지 사용법을 가집니다. 먼저, 뒤에 영숫자가 아닌 문자가 붙는다면, 그 문자가 가지고 있는 특별한 의미가 사라집니다. 이러한 - 이스케이프 문자로 백슬래시를 사용하는 것은 문자 클래스 안과 밖 양쪽에 + 회피 문자로 백슬래시를 사용하는 것은 문자 클래스 안과 밖 양쪽에 모두 적용됩니다. </para> <para> @@ -144,14 +144,14 @@ 패턴에 <link linkend="reference.pcre.pattern.modifiers">PCRE_EXTENDED</link> 옵션을 사용하면, 패턴에 존재하는 (문자 클래스 안이 아닌) 공백, 그리고 문자 클래스 밖의 "#"사이의 문자와 바로 뒤의 줄바꿈 문자를 무시합니다. - 이스케이프하는 백슬래시를 공백이나 "#"문자를 패턴에 넣기 위해 사용할 수 + 회피하는 백슬래시를 공백이나 "#"문자를 패턴에 넣기 위해 사용할 수 있습니다. </para> <para> 백슬래시의 두번째 사용법은 패턴에서 출력할 수 없는 문자를 보여지게 인코딩하는 방법을 제공합니다. 바이너리 제로가 패턴 종료를 의미하는걸 제외하면, 출력할 수 없는 문자가 나타나는 제한은 존재하지 않습니다. - 그러나 패턴을 텍스트 편집으로 준비할 때는, 다음의 이스케이프 시퀀스를 + 그러나 패턴을 텍스트 편집으로 준비할 때는, 다음의 회피 시퀀스를 사용하는 편이 바이너리 문자를 직접 표현하는 것보다 간편합니다: </para> <para> @@ -206,7 +206,7 @@ 구별하지 않습니다) <emphasis>UTF-8 모드</emphasis>에서는, "<literal>\x{...}</literal>"이 허용됩니다. 중괄호 안에는 16진수로 나타나는 문자열이 들어갑니다. 주어진 - 16진 문자열에 해당하는 UTF-8 문자로 해석합니다. 원래의 16진 이스케이프 + 16진 문자열에 해당하는 UTF-8 문자로 해석합니다. 원래의 16진 회피 시퀀스 <literal>\xhh</literal>는 127 이상일 경우에 2바이트 UTF-8 문자로 취급합니다. </para> @@ -340,7 +340,7 @@ </variablelist> </para> <para> - 각 이스케이프 시퀀스 조합은 완전한 문자 세트를 두개의 개별 세트로 + 각 회피 시퀀스 조합은 완전한 문자 세트를 두개의 개별 세트로 분리합니다. 주어진 문자는 각 조합의 한쪽에만 매치합니다. </para> <para> @@ -407,7 +407,7 @@ </para> <para> <literal>\A</literal>, <literal>\Z</literal>, <literal>\z</literal> - 단정은 전통적인 circumflex와 달러와는 달리 옵션과 관계 없이 목표 + 단정은 전통적인 곡절과 달러와는 달리 옵션과 관계 없이 목표 문자열의 가장 처음이나 가장 마지막에만 매치합니다. 이들은 <link linkend="reference.pcre.pattern.modifiers">PCRE_MULTILINE</link>이나 <link linkend="reference.pcre.pattern.modifiers">PCRE_DOLLAR_ENDONLU</link> 옵션에 @@ -425,20 +425,19 @@ </para> <para> - <literal>\Q</literal> and <literal>\E</literal> can be used to ignore - regexp metacharacters in the pattern since PHP 4.3.3. For example: - <literal>\w+\Q.$.\E$</literal> will match one or more word characters, - followed by literals <literal>.$.</literal> and anchored at the end of - the string. + <literal>\Q</literal>와 <literal>\E</literal>는 PHP 4.3.3부터 패턴에서 + 정규 표현식 메타문자를 무시하는데 사용할 수 있습니다. 예를 들면: + <literal>\w+\Q.$.\E$</literal> 문자열 끝에 위치하는 하나 이상의 단어에 + <literal>.$.</literal>이 붙는 경우에 매치합니다. </para> <para> - <literal>\K</literal> can be used to reset the match start since - PHP 5.2.4. For example, the pattern <literal>foo\Kbar</literal> matches - "foobar", but reports that it has matched "bar". The use of - <literal>\K</literal> does not interfere with the setting of captured - substrings. For example, when the pattern <literal>(foo)\Kbar</literal> - matches "foobar", the first substring is still set to "foo". + PHP 5.2.4부터 <literal>\K</literal>를 매치 시작을 초기화하는데 사용할 수 + 있습니다. 예를 들어, 패턴 <literal>foo\Kbar</literal>는 "foobar"에 + 매치하지만, "bar"에 매치했다고 보고합니다. <literal>\K</literal>의 + 사용은 캡쳐한 서브문자열의 설정에 간섭하지 않습니다. 예를 들어, + <literal>(foo)\Kbar</literal>가 "foobar"에 매치하였을 때, 첫 + 서브문자열은 여전히 "foo"로 설정됩니다. </para> </section> @@ -446,37 +445,36 @@ <section xml:id="regexp.reference.unicode"> <title>유니코드 문자 속성</title> <para> - Since PHP 4.4.0 and 5.1.0, three - additional escape sequences to match generic character types are available - when <emphasis>UTF-8 mode</emphasis> is selected. They are: + PHP 4.4.0과 5.1.0부터, <emphasis>UTF-8 모드</emphasis>를 선택하였을 때 + 일반 문자형에 매치하기 위해 사용할 수 있는 세가지 추가 회피 + 시퀀스가 존재합니다: </para> <variablelist> <varlistentry> <term><emphasis>\p{xx}</emphasis></term> - <listitem><simpara>a character with the xx property</simpara></listitem> + <listitem><simpara>xx 속성을 가지는 문자</simpara></listitem> </varlistentry> <varlistentry> <term><emphasis>\P{xx}</emphasis></term> - <listitem><simpara>a character without the xx property</simpara></listitem> + <listitem><simpara>xx 속성을 가지지 않는 문자</simpara></listitem> </varlistentry> <varlistentry> <term><emphasis>\X</emphasis></term> - <listitem><simpara>an extended Unicode sequence</simpara></listitem> + <listitem><simpara>확장 유니코드 시퀀스</simpara></listitem> </varlistentry> </variablelist> <para> - The property names represented by <literal>xx</literal> above are limited - to the Unicode general category properties. Each character has exactly one - such property, specified by a two-letter abbreviation. For compatibility with - Perl, negation can be specified by including a circumflex between the - opening brace and the property name. For example, <literal>\p{^Lu}</literal> - is the same as <literal>\P{Lu}</literal>. + 위에서 <literal>xx</literal>로 표현되는 속성 이름은 유니코드 일반 분류 + 속성으로 제한됩니다. 각 문자는 두 문자 약어로 지정되는 단 하나의 + 속성입니다. 펄과 호환을 위해, 곡절을 시작 중괄호와 속성 이름 사이에 + 넣어서 부정을 지정할 수 있습니다. 예를 들면, + <literal>\p{^Lu}</literal>는 <literal>\P{Lu}</literal>와 동일합니다. </para> <para> - If only one letter is specified with <literal>\p</literal> or - <literal>\P</literal>, it includes all the properties that start with that - letter. In this case, in the absence of negation, the curly brackets in the - escape sequence are optional; these two examples have the same effect: + <literal>\p</literal>나 <literal>\P</literal>에 한 문자만 지정하면, 그 + 문자로 시작하는 모든 속성을 포함합니다. 이 경우, 부정이 없으면 + 회피 시퀀스의 중괄호는 선택적입니다; 아래 두 에제는 같은 + 효과입니다: </para> <literallayout> \p{L} @@ -486,85 +484,85 @@ <title>지원하는 속성 코드</title> <tgroup cols="2"> <tbody> - <row><entry><literal>C</literal></entry><entry>Other</entry></row> - <row><entry><literal>Cc</literal></entry><entry>Control</entry></row> - <row><entry><literal>Cf</literal></entry><entry>Format</entry></row> - <row><entry><literal>Cn</literal></entry><entry>Unassigned</entry></row> - <row><entry><literal>Co</literal></entry><entry>Private use</entry></row> - <row rowsep="1"><entry><literal>Cs</literal></entry><entry>Surrogate</entry></row> - <row><entry><literal>L</literal></entry><entry>Letter</entry></row> - <row><entry><literal>Ll</literal></entry><entry>Lower case letter</entry></row> - <row><entry><literal>Lm</literal></entry><entry>Modifier letter</entry></row> - <row><entry><literal>Lo</literal></entry><entry>Other letter</entry></row> - <row><entry><literal>Lt</literal></entry><entry>Title case letter</entry></row> - <row rowsep="1"><entry><literal>Lu</literal></entry><entry>Upper case letter</entry></row> - <row><entry><literal>M</literal></entry><entry>Mark</entry></row> - <row><entry><literal>Mc</literal></entry><entry>Spacing mark</entry></row> - <row><entry><literal>Me</literal></entry><entry>Enclosing mark</entry></row> - <row rowsep="1"><entry><literal>Mn</literal></entry><entry>Non-spacing mark</entry></row> - <row><entry><literal>N</literal></entry><entry>Number</entry></row> - <row><entry><literal>Nd</literal></entry><entry>Decimal number</entry></row> - <row><entry><literal>Nl</literal></entry><entry>Letter number</entry></row> - <row rowsep="1"><entry><literal>No</literal></entry><entry>Other number</entry></row> - <row><entry><literal>P</literal></entry><entry>Punctuation</entry></row> - <row><entry><literal>Pc</literal></entry><entry>Connector punctuation</entry></row> - <row><entry><literal>Pd</literal></entry><entry>Dash punctuation</entry></row> - <row><entry><literal>Pe</literal></entry><entry>Close punctuation</entry></row> - <row><entry><literal>Pf</literal></entry><entry>Final punctuation</entry></row> - <row><entry><literal>Pi</literal></entry><entry>Initial punctuation</entry></row> - <row><entry><literal>Po</literal></entry><entry>Other punctuation</entry></row> - <row rowsep="1"><entry><literal>Ps</literal></entry><entry>Open punctuation</entry></row> - <row><entry><literal>S</literal></entry><entry>Symbol</entry></row> - <row><entry><literal>Sc</literal></entry><entry>Currency symbol</entry></row> - <row><entry><literal>Sk</literal></entry><entry>Modifier symbol</entry></row> - <row><entry><literal>Sm</literal></entry><entry>Mathematical symbol</entry></row> - <row rowsep="1"><entry><literal>So</literal></entry><entry>Other symbol</entry></row> - <row><entry><literal>Z</literal></entry><entry>Separator</entry></row> - <row><entry><literal>Zl</literal></entry><entry>Line separator</entry></row> - <row><entry><literal>Zp</literal></entry><entry>Paragraph separator</entry></row> - <row><entry><literal>Zs</literal></entry><entry>Space separator</entry></row> + <row><entry><literal>C</literal></entry><entry>기타</entry></row> + <row><entry><literal>Cc</literal></entry><entry>제어</entry></row> + <row><entry><literal>Cf</literal></entry><entry>형식</entry></row> + <row><entry><literal>Cn</literal></entry><entry>미할당</entry></row> + <row><entry><literal>Co</literal></entry><entry>사적 사용</entry></row> + <row rowsep="1"><entry><literal>Cs</literal></entry><entry>대리</entry></row> + <row><entry><literal>L</literal></entry><entry>문자</entry></row> + <row><entry><literal>Ll</literal></entry><entry>소문자</entry></row> + <row><entry><literal>Lm</literal></entry><entry>변경자</entry></row> + <row><entry><literal>Lo</literal></entry><entry>기타 문자</entry></row> + <row><entry><literal>Lt</literal></entry><entry>표제 문자</entry></row> + <row rowsep="1"><entry><literal>Lu</literal></entry><entry>대문자</entry></row> + <row><entry><literal>M</literal></entry><entry>마크</entry></row> + <row><entry><literal>Mc</literal></entry><entry>자간 마크</entry></row> + <row><entry><literal>Me</literal></entry><entry>동봉 마크</entry></row> + <row rowsep="1"><entry><literal>Mn</literal></entry><entry>비자간 마크</entry></row> + <row><entry><literal>N</literal></entry><entry>수</entry></row> + <row><entry><literal>Nd</literal></entry><entry>10진수</entry></row> + <row><entry><literal>Nl</literal></entry><entry>문자수</entry></row> + <row rowsep="1"><entry><literal>No</literal></entry><entry>기타 수</entry></row> + <row><entry><literal>P</literal></entry><entry>구두</entry></row> + <row><entry><literal>Pc</literal></entry><entry>연결 구두</entry></row> + <row><entry><literal>Pd</literal></entry><entry>대시 구두</entry></row> + <row><entry><literal>Pe</literal></entry><entry>닫는 구두</entry></row> + <row><entry><literal>Pf</literal></entry><entry>종료 구두</entry></row> + <row><entry><literal>Pi</literal></entry><entry>초기 구두</entry></row> + <row><entry><literal>Po</literal></entry><entry>기타 구두</entry></row> + <row rowsep="1"><entry><literal>Ps</literal></entry><entry>열기 구두</entry></row> + <row><entry><literal>S</literal></entry><entry>심볼</entry></row> + <row><entry><literal>Sc</literal></entry><entry>통화 심볼</entry></row> + <row><entry><literal>Sk</literal></entry><entry>변경 심볼</entry></row> + <row><entry><literal>Sm</literal></entry><entry>수학 심볼</entry></row> + <row rowsep="1"><entry><literal>So</literal></entry><entry>기타 심볼</entry></row> + <row><entry><literal>Z</literal></entry><entry>구분자</entry></row> + <row><entry><literal>Zl</literal></entry><entry>줄 구분자</entry></row> + <row><entry><literal>Zp</literal></entry><entry>문단 구분자</entry></row> + <row><entry><literal>Zs</literal></entry><entry>공백 구분자</entry></row> </tbody> </tgroup> </table> <para> - Extended properties such as "Greek" or "InMusicalSymbols" are not - supported by PCRE. + "Greek"이나 "InMusicalSymbols" 같은 확장 심볼은 PCRE에서 지원하지 + 않습니다. </para> <para> - Specifying caseless matching does not affect these escape sequences. - For example, <literal>\p{Lu}</literal> always matches only upper case letters. + 대소문자 구분 없는 매치 지정은 이 회피 시퀀스에는 영향을 주지 + 않습니다. 예를 들어, <literal>\p{Lu}</literal>는 항상 대문자에만 + 매치합니다. </para> <para> - The <literal>\X</literal> escape matches any number of Unicode characters - that form an extended Unicode sequence. <literal>\X</literal> is equivalent - to <literal>(?>\PM\pM*)</literal>. + <literal>\X</literal> 회피는 확장 유니코드 시퀀스를 이루는 모든 + 유니코드 문자에 매치합니다. <literal>\X</literal>는 + <literal>(?>\PM\pM*)</literal>과 동일합니다. </para> <para> - That is, it matches a character without the "mark" property, followed - by zero or more characters with the "mark" property, and treats the - sequence as an atomic group (see below). Characters with the "mark" - property are typically accents that affect the preceding character. + 즉, "마크" 속성이 없는 문자에 매치하거나, "마크" 속성에 붙는 하나 이상의 + 문자에 매치하고, 시퀀스를 원자 집단으로 취급합니다(아래 참고). "마크" + 속성을 가지는 문자는 일반적으로 선행 문자에 영향을 주는 엑센트입니다. </para> <para> - Matching characters by Unicode property is not fast, because PCRE has - to search a structure that contains data for over fifteen thousand - characters. That is why the traditional escape sequences such as - <literal>\d</literal> and <literal>\w</literal> do not use Unicode properties - in PCRE. + 유니코드 속성으로 문자를 매치하는 것은 빠르지 않습니다. PCRE가 + 15,000자를 넘는 데이터를 가진 구조를 검색해야 하기 때문입니다. 이것이 + PCRE에서 유니코드 속성이 아닌, <literal>\d</literal>와 + <literal>\w</literal> 같은 전통적인 회피 시퀀스를 사용해야 하는 + 이유입니다. </para> </section> <section xml:id="regexp.reference.circudollar"> - <title>Circumflex와 달러</title> + <title>곡절과 달러</title> <para> - 문자열 클래스의 밖, 기본 매칭 모드에서는 circumflex 문자는 현재 매칭 + 문자열 클래스의 밖, 기본 매칭 모드에서는 곡절 문자는 현재 매칭 위치가 목표 문자열의 시작일 경우에만 성공하는 단정입니다. 문자열 클래스 - 안에서 cicumflex는 완전히 다른 의미를 가집니다. (아래 참고) + 안에서 곡절은 완전히 다른 의미를 가집니다. (아래 참고) </para> <para> - 여러 개의 선택을 가질 경우 circumflex는 패턴의 처음 문자일 필요가 + 여러 개의 선택을 가질 경우 곡절은 패턴의 처음 문자일 필요가 없지만, 패턴이 그 브랜치에 처음 매치할 경우를 나타내는 각 선택에서의 - 처음 문자여야 합니다. 모든 선택이 circumflex로 시작하는, 목표의 + 처음 문자여야 합니다. 모든 선택이 곡절로 시작하는, 목표의 처음에만 매치하는 패턴은 "고정" 패턴이라 불려집니다. (패턴을 고정하는 다른 구조도 존재합니다) </para> @@ -583,7 +581,7 @@ </para> <para> <link linkend="reference.pcre.pattern.modifiers">PCRE_MULTILINE</link> 옵션을 - 설정하면, circumflex와 달러 문자의 의미가 달라집니다. 이 경우, 목표 + 설정하면, 곡절과 달러 문자의 의미가 달라집니다. 이 경우, 목표 문자열의 처음과 마지막에 더하여, 내부의 "\n" 문자의 뒤와 앞에도 매치합니다. 예를 들어, 패턴 /^abc$/는 멀티라인 모드에서는 목표 문자열 "def\nabc"에 매치하지만, 그렇지 않다면 매치하지 않습니다. 따라서, 모든 @@ -608,7 +606,7 @@ 출력할 수 없는 문자도 포함하지만, (기본값으로) 줄바꿈은 포함하지 않습니다. <link linkend="reference.pcre.pattern.modifiers">PCRE_DOTALL</link> 옵션을 설정하면, 마침표가 줄바꿈에도 매치합니다. 마침표의 처리는 - circumflex와 달러의 처리와는 완전히 독립이며, 유일한 관계는 두 경우 모두 + 곡절과 달러의 처리와는 완전히 독립이며, 유일한 관계는 두 경우 모두 줄바꿈 문자에 해당한다는 점입니다. 마침표는 문자 클래스 안에서는 특별한 의미를 가지지 않습니다. </para> @@ -624,19 +622,19 @@ <para> 여는 대괄호로 문자 클래스를 시작하고, 닫는 대괄호로 종료합니다. 닫는 대괄호는 그 자체로는 특별한 의미가 없습니다. 닫는 대괄호를 클래스의 - 멤버로 사용하려면 클래스의 가장 처음(존재한다면 시작 circumflex 뒤에)에 - 위치하거나 백슬래시로 이스케이프해야 합니다. + 멤버로 사용하려면 클래스의 가장 처음(존재한다면 시작 곡절 뒤에)에 + 위치하거나 백슬래시로 회피해야 합니다. </para> <para> 문자 클래스는 목표에서 하나의 문자에 매치합니다; 그 문자는 클래스가 - 정의하는 문자 세트에 존재해야 합니다. 클래스가 circumflex로 + 정의하는 문자 세트에 존재해야 합니다. 클래스가 곡절로 시작할 경우에는, 목표 문자는 클래스 정의 세트에 존재하지 않아야 합니다. - circumflex가 클래스 멤버로 필요할 때는, 처음에 위치시키지 않거나 - 백슬래시로 이스케이프해야 합니다. + 곡절이 클래스 멤버로 필요할 때는, 처음에 위치시키지 않거나 + 백슬래시로 회피해야 합니다. </para> <para> 예를 들면, 문자 클래스 [aeiou]는 모든 소문자 모음에 매치하지만, - [^aeiow]는 소문자 모음이 아닌 모든 문자에 매치합니다. circumflex는 단지 + [^aeiow]는 소문자 모음이 아닌 모든 문자에 매치합니다. 곡절은 단지 클래스에 존재하는 문자가 아닌 것들을 지정하는 편리한 방법일 뿐이라는 점에 주의하십시오. 단정이 아닙니다: 목표 문자열에서 문자를 찾아내며, 현재 위치가 문자열의 끝이면 실패합니다. @@ -657,14 +655,14 @@ <para> 빼기(하이픈) 문자는 문자 클래스에서 문자의 범위를 지정하는데 사용할 수 있습니다. 예를 들어, [d-m]은 d부터 m까지의 모든 문자에 매치합니다. 빼기 - 문자가 클래스에서 필요하면, 백슬래시로 이스케이프하거나, 클래스의 맨 + 문자가 클래스에서 필요하면, 백슬래시로 회피하거나, 클래스의 맨 처음이나 마지막처럼 범위로 해석할 수 없는 위치에 나타나야 합니다. </para> <para> 문자 "]"를 범위의 마지막으로 지정하는 것은 불가능합니다. [W-]46]과 같은 패턴은 두 문자를 가지는 클래스("W"와 "-") 뒤에 일반 문자열 "46]"이 붙는 형태로 해석합니다. 그러므로 "W46]"이나 "-46]"에 매치합니다. 그러나, - "]"를 백슬래시로 이스케이프하면 범위의 끝으로 해석하기에, [W-\]46]은 + "]"를 백슬래시로 회피하면 범위의 끝으로 해석하기에, [W-\]46]은 범위와 두개의 개별 문자를 가지는 하나의 클래스로 해석합니다. 범위의 마지막으로 "]"의 8진수 및 16진수 표현을 사용할 수도 있습니다. </para> @@ -678,13 +676,13 @@ <para> 문자형 \d, \D, \s, \S, \w, \W도 문자 클래스에서 사용할 수 있고, 해당하는 문자들을 클래스에 추가합니다. 예를 들어, [\dABCDEF]는 모든 16진수에 - 매치합니다. circumflex와 위에서 대문자형을 지정하여 소문자형을 매칭하는 + 매치합니다. 곡절과 위에서 대문자형을 지정하여 소문자형을 매칭하는 데에 편리하게 제한을 할 수 있습니다. 예를 들어, 클래스 [^\W_]는 언더스코어를 제외한 모든 문자와 숫자에 매치합니다. </para> <para> \, -, ^(시작 위치), 종료 ]를 제외한 모든 영숫자가 아닌 문자는 문자 - 클래스에서 특별한 의미를 가지지 않지만, 이스케이프 해도 문제가 + 클래스에서 특별한 의미를 가지지 않지만, 회피해도 문제가 발생하지는 않습니다. </para> </section> @@ -809,9 +807,11 @@ </para> <para> 1. 선택 세트를 지역화합니다. 예를 들어, 패턴 - <literal>cat(aract|erpillar|)</literal>는 "cat", "cataract", - "caterpillar" 중에 하나에 매치합니다. 괄호가 없으면, "cataract", - "erpillar", 또는 빈 문자열에 매치할 것입니다. + + <literal>cat(aract|erpillar|)</literal>는 + + "cat", "cataract", "caterpillar" 중에 하나에 매치합니다. 괄호가 없으면, + "cataract", "erpillar", 또는 빈 문자열에 매치할 것입니다. </para> <para> 2. 서브패턴을 (위에서 정의한) 캡쳐한 서브패턴으로 지정합니다. 모든 @@ -822,12 +822,14 @@ </para> <para> 예를 들어, 문자열 "the red king"이 패턴 - <literal>the ((read|white) (king|queen)</literal>에 매치한다면, "red - king", "red", "king" 부분 문자열을 잡아내고, 1, 2, 3의 숫자를 - 부여합니다. + + <literal>the ((read|white) (king|queen)</literal>에 + + 매치한다면, "red king", "red", "king" 부분 문자열을 잡아내고, 1, 2, 3의 + 숫자를 부여합니다. </para> <para> - The fact that plain parentheses fulfil two functions is not + The fact that plain parentheses fulfill two functions is not always helpful. There are often times when a grouping subpattern is required without a capturing requirement. If an opening parenthesis is followed by "?:", the subpattern does @@ -835,7 +837,9 @@ number of any subsequent capturing subpatterns. For example, if the string "the white queen" is matched against the pattern + <literal>the ((?:red|white) (king|queen))</literal> + the captured substrings are "white queen" and "queen", and are numbered 1 and 2. The maximum number of captured substrings is 99, and the maximum number of all subpatterns, @@ -871,7 +875,7 @@ 반복은 다음 항목들에 덧붙이는 수량어로 지정합니다: <itemizedlist> <listitem> - <simpara>이스케이프할 수 있는 하나의 문자</simpara> + <simpara>회피할 수 있는 하나의 문자</simpara> </listitem> <listitem><simpara>. 메타 문자</simpara></listitem> <listitem><simpara>문자 클래스</simpara></listitem> @@ -888,8 +892,15 @@ "zz", "zzz", "zzzz"에 매치합니다. 닫는 괄호 자체는 특수 문자가 아닙니다. 두번째 수를 생략하고, 쉼표가 존재하면 최대 제한이 없어집니다; 두번째 수와 쉼표를 모두 생략하면, 수량어는 요구하는 매치 수의 정확한 수를 - 지정합니다. 그러므로, <literal>[aeiou]{3,}</literal>는 3개 이상의 모음에 - 매치하지만, <literal>\d{8}</literal>은 8자리 수에만 매치합니다. 수량어를 + 지정합니다. 그러므로, + + <literal>[aeiou]{3,}</literal>는 + + 3개 이상의 모음에 매치하지만, + + <literal>\d{8}</literal>은 + + 8자리 수에만 매치합니다. 수량어를 허용하지 않는 위치에서 중괄호를 여는 것은 수량어 구문으로 매치하지 않고, 일반 문자로 취급합니다. 예를 들어, {,6}는 수량어가 아닌, 4 문자의 일반 문자열입니다. @@ -924,6 +935,7 @@ <para> 상위 제한이 없는 수량어에 문자를 매치지키지 않음으로써, 다음 서브패턴과 같이 무한루프를 만들수 있습니다. 예를 들면: + <literal>(a?)*</literal> </para> <para> @@ -941,9 +953,13 @@ the sequences /* and */ and within the sequence, individual * and / characters may appear. An attempt to match C comments by applying the pattern + <literal>/\*.*\*/</literal> + to the string + <literal>/* first comment */ not comment /* second comment */</literal> + fails, because it matches the entire string due to the greediness of the .* item. </para> @@ -951,14 +967,18 @@ However, if a quantifier is followed by a question mark, then it ceases to be greedy, and instead matches the minimum number of times possible, so the pattern + <literal>/\*.*?\*/</literal> + does the right thing with the C comments. The meaning of the various quantifiers is not otherwise changed, just the preferred number of matches. Do not confuse this use of question mark with its use as a quantifier in its own right. Because it has two uses, it can sometimes appear doubled, as in + <literal>\d??\d</literal> + which matches one digit by preference, but can match two if that is the only way the rest of the pattern matches. </para> @@ -998,13 +1018,17 @@ <para> When a capturing subpattern is repeated, the value captured is the substring that matched the final iteration. For example, after + <literal>(tweedle[dume]{3}\s*)+</literal> + has matched "tweedledum tweedledee" the value of the captured substring is "tweedledee". However, if there are nested capturing subpatterns, the corresponding captured values may have been set in previous iterations. For example, after + <literal>/(a|(b))+/</literal> + matches "aba" the value of the second captured substring is "b". </para> @@ -1039,7 +1063,9 @@ but not "sense and responsibility". If caseful matching is in force at the time of the back reference, then the case of letters is relevant. For example, + <literal>((?i)rah)\s+\1</literal> + matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original capturing subpattern is matched caselessly. </para> @@ -1048,7 +1074,9 @@ If a subpattern has not actually been used in a particular match, then any back references to it always fail. For example, the pattern + <literal>(a|(bc))\2</literal> + always fails if it starts to match "a" rather than "bc". Because there may be up to 99 back references, all digits following the backslash are taken as part of a potential @@ -1062,7 +1090,9 @@ it refers fails when the subpattern is first used, so, for example, (a\1) never matches. However, such references can be useful inside repeated subpatterns. For example, the pattern + <literal>(a|b\1)+</literal> + matches any number of "a"s and also "aba", "ababaa" etc. At each iteration of the subpattern, the back reference matches the character string corresponding to the previous iteration. @@ -1095,13 +1125,19 @@ that it does not cause the current matching position to be changed. Lookahead assertions start with (?= for positive assertions and (?! for negative assertions. For example, + <literal>\w+(?=;)</literal> + matches a word followed by a semicolon, but does not include the semicolon in the match, and + <literal>foo(?!bar)</literal> + matches any occurrence of "foo" that is not followed by "bar". Note that the apparently similar pattern + <literal>(?!foo)bar</literal> + does not find an occurrence of "bar" that is preceded by something other than "foo"; it finds any occurrence of "bar" whatsoever, because the assertion (?!foo) is always &true; @@ -1346,6 +1382,7 @@ more readable (assume the <link linkend="reference.pcre.pattern.modifiers">PCRE_EXTENDED</link> option) and to divide it into three parts for ease of discussion: + <literal>( \( )? [^()]+ (?(1) \) )</literal> </para> <para> @@ -1374,6 +1411,7 @@ non-significant white space, and with the two alternatives on the second line: </para> + <literallayout> (?(?=[^a-z]*[a-z]) \d{2}-[a-z]{3}-\d{2} | \d{2}-\d{2}-\d{2} )
« previous php.doc.kr (#804) next »