Why isn't this regex matching a string with percentage symbol?
<p>I have a file which has the following input : </p>

<pre><code>xa%1bc
ba%1bc
.
.
</code></pre>

<p>and so on. I want to use <code>match</code> and <code>regex</code> to identify the lines which have <code>a%1b</code>in them. 
I am using </p>

<pre><code> import re
 p1 = re.compile(r'\ba%1b\b', flags=re.I)
 if re.match(p1,linefromfile):
    continue
</code></pre>

<p>It doesnt seem to detect the line with %1. What is the issue? Thanks</p>