title: How to disallow non-alphanumeric characters in ColdFusion using a RegEx
body: <p>I am using ColdFusion 9.0.1.</p>
  
  <p>I am trying to test whether a user has provided a non alphanumeric value. If they have, I want to return false.  I'm pretty sure I am close, but I keep getting an error:</p>
  
  <pre><code>Complex object types cannot be converted to simple values.
  </code></pre>
  
  <p>I've tried multiple ways of making this work, but I can't get it to work.</p>
  
  <p>Specifically, I want to allow only a through z and 0 through 9. No spaces, or special characters.</p>
  
  <p>Can you help me tweak this?</p>
  
  <pre><code>    &lt;cfscript&gt;
          LOCAL.Description = trim(left(ARGUMENTS.Description, 15));
          if (len(LOCAL.Description) lte 4) {
              return false;
          } else if (reMatchNoCase("[^A-Za-z0-9_]", LOCAL.Description) neq "") {
              return false;
          } else {
              return true;
      &lt;/cfscript&gt;
  </code></pre>
  
  <p>W</p>