<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div>Hi All,<br><br></div><div>If you notice the below example, case I is working as expected.<br></div><div><br>Case I:<br>In [41]: string = "<H*>test<H*>"<br>

<br>In [42]: re.match('<H\*>',string).group()<br>
Out[42]: '<H*>'<br><br></div><div>But why is the raw string 'r' not working as expected ?<br></div><div><br></div><div>Case II:<br></div><div><br>In [43]: re.match(r'<H*>',string).group()<br>


---------------------------------------------------------------------------<br>AttributeError                            Traceback (most recent call last)<br><ipython-input-43-d66b47f01f1c> in <module>()<br>----> 1 re.match(r'<H*>',string).group()<br>


<br>AttributeError: 'NoneType' object has no attribute 'group'<br><br>In [44]: re.match(r'<H*>',string)<br><br><br clear="all"><br></div>Thanks,<br>santosh<br>
</div>
</div><br>
</div>