<?xml version="1.0" encoding="windows-1252"?>
<node id="709290" title="Re: Benchmarking &quot;Are all these characters in this sentence?&quot;" created="2008-09-05 10:33:51" updated="2008-09-05 06:33:51">
<type id="11">
note</type>
<author id="524457">
martin</author>
<data>
<field name="doctext">
Just for completeness, try this one, too:

&lt;code&gt;
  martin =&gt; sub {
      # args: sentence, wantedchars
      '' eq $_[1] ||
      '' ne $_[0] &amp;&amp;
      $_[1] =~ /^[\Q$_[0]\E]*\z/;
  },
&lt;/code&gt;

Putting the whole sentence into a character class will kind of suck with veeery long sentences but medium-sized cases should benefit from the one-pass approach.
&lt;p&gt;
&lt;i&gt;Update: fixed the order of subroutine parameters&lt;/i&gt;</field>
<field name="root_node">
707621</field>
<field name="parent_node">
707621</field>
</data>
</node>
