<?xml version="1.0" encoding="windows-1252"?>
<node id="788498" title="Re^3: Nifty qr OR bullets with butterfly wings" created="2009-08-13 22:59:47" updated="2009-08-13 22:59:47">
<type id="11">
note</type>
<author id="381608">
ikegami</author>
<data>
<field name="doctext">
&lt;p&gt;It returns the &lt;em&gt;string&lt;/em&gt; &lt;c&gt;(?-xism:[@*+])&lt;/c&gt;

&lt;ol&gt;
&lt;li&gt;&lt;c&gt;qr/[%s]/&lt;/c&gt; builds a regex that matches strings containing "&lt;c&gt;%&lt;/c&gt;" or "&lt;c&gt;s&lt;/c&gt;".
&lt;li&gt;&lt;c&gt;sprintf&lt;/c&gt; stringifies the compiled regex to &lt;c&gt;(?-xism:[%s])&lt;/c&gt; to use it as the format pattern.
&lt;li&gt;The characters are included into the format pattern and the result is returned by &lt;c&gt;sprintf&lt;/c&gt;.
&lt;/ol&gt;

&lt;p&gt;So not only do you not end up with a compiled pattern, you waste time compiling a pattern you never use!
</field>
<field name="root_node">
788420</field>
<field name="parent_node">
788429</field>
</data>
</node>
