Checking whether a string contains some characters in python
<p>I want to check if a string only contains A-Z and a-z and 0-9 and underscore and dash (_ -)</p>

<p>Any other special signs like !"#\% should not be contained</p>

<p>How can I write the regular expression?</p>

<p>and use <code>match</code> or ?</p>

<p>My strings look like these: QOIWU_W  QWLJ2-1</p>
