python looking for a specific string pattern
<p>I would like to parse a string in python which is the off format</p>

<p>"JXE 2000 This is a bug to fix blah " or of the format</p>

<p>"JXE-2000: This is a bug to fix blah "  and check if the string has  JXE and a number.</p>

<p>In the above example I will need to check if the string has JXE and 2000. I am new to python.</p>

<p>I tried the following:</p>

<pre><code>textpattern="JXE-5000: This is bug "
text=re.compile("^([A-Z][0-9]+)*$")

text=re.search("JXE (.*)", textpattern)

print (text.groups())
</code></pre>

<p>I seem to be getting only "5000 This is a bug".</p>
