 <pre><code>string newPassword = Membership.GeneratePassword(15, 0); newPassword = Regex.Replace(newPassword, @"[^a-zA-Z0-9]", m =&gt; "9" ); </code></pre> <p>This regular expression will replace all non alphanumeric characters with the numeric character 9.</p>