Changeset 71188 for trunk/doc-new


Ignore:
Timestamp:
Sep 3, 2010, 11:20:24 PM (9 years ago)
Author:
raimue@…
Message:

guide: add brief documentation for strsed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc-new/guide/xml/portfile-tcl.xml

    r40980 r71188  
    222222    </varlistentry>
    223223
     224    <varlistentry id="reference.tcl-extensions.strsed">
     225        <term>strsed</term>
     226
     227        <listitem>
     228            <para>strsed can be used for string manipulations using regular
     229            expressions. It supports a small subset of the commands known
     230            from sed(1).</para>
     231
     232            <variablelist>
     233                <varlistentry>
     234                    <term>strsed <replaceable>string</replaceable>
     235                    s/<replaceable>regex</replaceable>/<replaceable>replacement</replaceable>/
     236                    </term>
     237
     238                    <listitem>
     239                        <para>Replaces the first instance of
     240                        <replaceable>regex</replaceable> with
     241                        <replaceable>replacement</replaceable>. Refer to
     242                        re_format(7) for a definition of regular expression
     243                        syntax.</para>
     244                    </listitem>
     245                </varlistentry>
     246
     247                <varlistentry>
     248                    <term>strsed <replaceable>string</replaceable>
     249                    g/<replaceable>regex</replaceable>/<replaceable>replacement</replaceable>/
     250                    </term>
     251
     252                    <listitem>
     253                        <para>The same as the previous format, except all
     254                        instances of the pattern will be replaced, not only
     255                        the first (mnemonic: 'g' is for global).</para>
     256                    </listitem>
     257                </varlistentry>
     258            </variablelist>
     259        </listitem>
     260    </varlistentry>
     261
    224262    <varlistentry>
    225263      <term>reinplace</term>
Note: See TracChangeset for help on using the changeset viewer.