Python regex : trimming special characters
<p>Is it possible to remove special characters using regex?</p>

<p>I'm attempting to trim:</p>

<pre><code>\n\t\t\t\t\t\t\t\t\t\tButte County High School\t\t\t\t\t\t\t\t\t
</code></pre>

<p>down to:</p>

<pre><code>Butte County High School
</code></pre>

<p>using    </p>

<pre><code>regexform = re.sub("[A-Z]+[a-z]+\s*",'', schoolstring)
print regexform
</code></pre>

<p>Except you have reasons to want to use regex, you can remove all edge white space with <code>.strip()</code> function in python</p>

python regex expression