cvs: /phpdoc/functions pcre.sgml
| From: | Andrey Zmievski | Date: | Thu, 22 Jul 1999 13:53:18 +0000 |
| Subject: | cvs: /phpdoc/functions pcre.sgml | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8975@lists.php.net to get a copy of this message | ||
andrey Thu Jul 22 09:53:18 1999 EDT
Modified files:
/phpdoc/functions pcre.sgml
Log:
Rename options to modifiers.
Index: phpdoc/functions/pcre.sgml
diff -u phpdoc/functions/pcre.sgml:1.7 phpdoc/functions/pcre.sgml:1.8
--- phpdoc/functions/pcre.sgml:1.7 Wed Jul 21 09:55:46 1999
+++ phpdoc/functions/pcre.sgml Thu Jul 22 09:53:17 1999
@@ -12,9 +12,9 @@
it needs to be escaped by backslash.
<para>
- The ending delimiter may be followed by various options that
+ The ending delimiter may be followed by various modifiers that
affect the matching.
- See <link linkend="pcre.pattern.options">Pattern Options</link>.
+ See <link linkend="pcre.pattern.modifiers">Pattern Modifiers</link>.
<para>
<example>
@@ -31,7 +31,7 @@
<title>Examples of invalid patterns</title>
<itemizedlist>
<listitem><simpara>/href='(.*)' - missing ending
delimiter</listitem>
- <listitem><simpara>/\w+\s*\w+/J - unknown option 'J'</listitem>
+ <listitem><simpara>/\w+\s*\w+/J - unknown modifier 'J'</listitem>
<listitem><simpara>1-\d3-\d3-\d4| - missing starting delimiter
</listitem>
</itemizedlist>
@@ -247,7 +247,7 @@
though.
<para>
- <literal>/e</literal> option makes
+ <literal>/e</literal> modifier makes
<function>preg_replace</function> treat the
<parameter>replacement</parameter> parameter as PHP code after
the appropriate references substitution is done. Tip: make sure
@@ -256,7 +256,7 @@
the line containing <function>preg_replace</function>.
<note>
<para>
- This option was added in PHP 4.0.
+ This modifier was added in PHP 4.0.
</note>
<para>
@@ -276,7 +276,7 @@
</programlisting>
<example>
- <title>Using /e option</title>
+ <title>Using /e modifier</title>
<programlisting>
preg_replace("/(<\/?)(\w+)([^>]*>)/e",
"'\\1'.strtoupper('\\2').'\\3'", $html_body);
</programlisting>
@@ -390,17 +390,17 @@
</refsect1>
</refentry>
- <refentry id="pcre.pattern.options">
+ <refentry id="pcre.pattern.modifiers">
<refnamediv>
- <refname>Pattern Options</refname>
- <refpurpose>describes possible options in regex
+ <refname>Pattern Modifiers</refname>
+ <refpurpose>describes possible modifiers in regex
patterns</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
- The current possible PCRE options are listed below. The names in
- parentheses refer to internal PCRE names for these options.
+ The current possible PCRE modifiers are listed below. The names in
+ parentheses refer to internal PCRE names for these modifiers.
<para>
<blockquote>
@@ -409,7 +409,7 @@
<term><emphasis>i</emphasis> (PCRE_CASELESS)</term>
<listitem>
<simpara>
- If this option is set, letters in the pattern match both
+ If this modifier is set, letters in the pattern match both
upper and lower case letters.
</listitem>
</varlistentry>
@@ -424,17 +424,17 @@
matches only at the start of the string, while the "end of
line" metacharacter ($) matches only at the end of the
string, or before a terminating newline (unless
- <emphasis>E</emphasis> option is set). This is the same as
+ <emphasis>E</emphasis> modifier is set). This is the same as
Perl.
<simpara>
- When this option is set, the "start of line" and "end of
+ When this modifier is set, the "start of line" and "end of
line" constructs match immediately following or immediately
before any newline in the subject string, respectively, as
well as at the very start and end. This is equivalent to
- Perl's /m option. If there are no "\n" characters in a
+ Perl's /m modifier. If there are no "\n" characters in a
subject string, or no occurrences of ^ or $ in a pattern,
- setting this option has no effect.
+ setting this modifier has no effect.
</listitem>
</varlistentry>
@@ -442,12 +442,12 @@
<term><emphasis>s</emphasis> (PCRE_DOTALL)</term>
<listitem>
<simpara>
- If this option is set, a dot metacharater in the pattern
+ If this modifier is set, a dot metacharater in the pattern
matches all characters, including newlines. Without it,
- newlines are excluded. This option is equivalent to Perl's
- /s option. A negative class such as [^a] always matches a
+ newlines are excluded. This modifier is equivalent to Perl's
+ /s modifier. A negative class such as [^a] always matches a
newline character, independent of the setting of this
- option.
+ modifier.
</listitem>
</varlistentry>
@@ -455,12 +455,12 @@
<term><emphasis>x</emphasis> (PCRE_EXTENDED)</term>
<listitem>
<simpara>
- If this option is set, whitespace data characters in the
+ If this modifier is set, whitespace data characters in the
pattern are totally ignored except when escaped or inside a
character class, and characters between an unescaped #
outside a character class and the next newline character,
inclusive, are also ignored. This is equivalent to Perl's /x
- option, and makes it possible to include comments inside
+ modifier, and makes it possible to include comments inside
complicated patterns. Note, however, that this applies only
to data characters. Whitespace characters may never appear
within special character sequences in a pattern, for example
@@ -473,17 +473,17 @@
<term><emphasis>e</emphasis></term>
<listitem>
<simpara>
- If this option is set, <function>preg_replace</function>
+ If this modifier is set, <function>preg_replace</function>
does normal substitution of \\ references in the
replacement string, evaluates it as PHP code, and uses the
result for replacing the search string.
<simpara>
- Only <function>preg_replace</function> uses this option; it is ignored by other PCRE
functions.
+ Only <function>preg_replace</function> uses this modifier; it is ignored by other
PCRE functions.
<note>
<para>
- This option was added in PHP 4.0.
+ This modifier was added in PHP 4.0.
</note>
</listitem>
</varlistentry>
@@ -492,7 +492,7 @@
<term><emphasis>A</emphasis> (PCRE_ANCHORED)</term>
<listitem>
<simpara>
- If this option is set, the pattern is forced to be
+ If this modifier is set, the pattern is forced to be
"anchored", that is, it is constrained to match only at the
start of the string which is being searched (the "subject
string"). This effect can also be achieved by appropriate
@@ -505,12 +505,12 @@
<term><emphasis>E</emphasis> (PCRE_DOLLAR_ENDONLY)</term>
<listitem>
<simpara>
- If this option is set, a dollar metacharacter in the pattern
+ If this modifier is set, a dollar metacharacter in the pattern
matches only at the end of the subject string. Without this
- option, a dollar also matches immediately before the final
+ modifier, a dollar also matches immediately before the final
character if it is a newline (but not before any other
- newlines). This option is ignored if <emphasis>m</emphasis>
- option is set. There is no equivalent to this option in
+ newlines). This modifier is ignored if <emphasis>m</emphasis>
+ modifier is set. There is no equivalent to this modifier in
Perl.
</listitem>
</varlistentry>
@@ -521,7 +521,7 @@
<simpara>
When a pattern is going to be used several times, it is
worth spending more time analyzing it in order to speed up
- the time taken for matching. If this option is set, then
+ the time taken for matching. If this modifier is set, then
this extra analysis is performed. At present, studying a
pattern is useful only for non-anchored patterns that do not
have a single fixed starting character.
@@ -532,10 +532,10 @@
<term><emphasis>U</emphasis> (PCRE_UNGREEDY)</term>
<listitem>
<simpara>
- This option inverts the "greediness" of the quantifiers so
+ This modifier inverts the "greediness" of the quantifiers so
that they are not greedy by default, but become greedy if
followed by "?". It is not compatible with Perl. It can also
- be set by a (?U) option setting within the pattern.
+ be set by a (?U) modifier setting within the pattern.
</listitem>
</varlistentry>
@@ -543,14 +543,14 @@
<term><emphasis>X</emphasis> (PCRE_EXTRA)</term>
<listitem>
<simpara>
- This option turns on additional functionality of PCRE that
+ This modifier turns on additional functionality of PCRE that
is incompatible with Perl. Any backslash in a pattern that
is followed by a letter that has no special meaning causes
an error, thus reserving these combinations for future
expansion. By default, as in Perl, a backslash followed by a
letter with no special meaning is treated as a literal.
There are at present no other features controlled by this
- option.
+ modifier.
</listitem>
</varlistentry>
</variablelist>