[71188] trunk/doc-new/guide/xml/portfile-tcl.xml

raimue at macports.org raimue at macports.org
Fri Sep 3 16:20:27 PDT 2010


Revision: 71188
          http://trac.macports.org/changeset/71188
Author:   raimue at macports.org
Date:     2010-09-03 16:20:24 -0700 (Fri, 03 Sep 2010)
Log Message:
-----------
guide: add brief documentation for strsed

Modified Paths:
--------------
    trunk/doc-new/guide/xml/portfile-tcl.xml

Modified: trunk/doc-new/guide/xml/portfile-tcl.xml
===================================================================
--- trunk/doc-new/guide/xml/portfile-tcl.xml	2010-09-03 22:51:03 UTC (rev 71187)
+++ trunk/doc-new/guide/xml/portfile-tcl.xml	2010-09-03 23:20:24 UTC (rev 71188)
@@ -221,6 +221,44 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry id="reference.tcl-extensions.strsed">
+        <term>strsed</term>
+
+        <listitem>
+            <para>strsed can be used for string manipulations using regular
+            expressions. It supports a small subset of the commands known
+            from sed(1).</para>
+
+            <variablelist>
+                <varlistentry>
+                    <term>strsed <replaceable>string</replaceable>
+                    s/<replaceable>regex</replaceable>/<replaceable>replacement</replaceable>/
+                    </term>
+
+                    <listitem>
+                        <para>Replaces the first instance of
+                        <replaceable>regex</replaceable> with
+                        <replaceable>replacement</replaceable>. Refer to
+                        re_format(7) for a definition of regular expression
+                        syntax.</para>
+                    </listitem>
+                </varlistentry>
+
+                <varlistentry>
+                    <term>strsed <replaceable>string</replaceable>
+                    g/<replaceable>regex</replaceable>/<replaceable>replacement</replaceable>/
+                    </term>
+
+                    <listitem>
+                        <para>The same as the previous format, except all
+                        instances of the pattern will be replaced, not only
+                        the first (mnemonic: 'g' is for global).</para>
+                    </listitem>
+                </varlistentry>
+            </variablelist>
+        </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term>reinplace</term>
 
@@ -352,4 +390,4 @@
       </listitem>
     </varlistentry>
   </variablelist>
-</section>
\ No newline at end of file
+</section>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100903/57d85fbc/attachment.html>


More information about the macports-changes mailing list