Regex to test an expression : <p>I have this expression:</p>

<pre><code>/width*$/.test(oldStyle)
</code></pre>

<p>And oldStyle has this inside of it:</p>

<pre><code>width:90%;height:inherit;padding-left:20px;
</code></pre>

<p>The expression should return true as i have tested it in a online JavaScript regex expression tool.</p>

<p>Why is this returning false?</p>

<p>Can i use this expression the way i have coded?</p>
