Regular expression to allow space between two string? : <p>I have following pattern to validate the String</p>

<pre><code>pattern ="^[a-zA-Z0-9_{}#$\/\-\+@!?()^%$`~|:,.=\[\]]*$"
</code></pre>

<p>But here it is not accepting space between two string as well.Can someone please tell me what changes i have to do in above pattern so it will allow space between two string? But Space should not be allowed at the beginning and end of string.</p>
