Javascript Regex to check for String in line with pre and post characters
<p>I am writing a regex function so that I can test a string for a few options.</p>

<p>here are some examples of Strings I want to search for.</p>

<pre><code> 5.6 - 6.6*
 5.6 - 6.6(4)
&lt;5.6 - 6.6**
</code></pre>

<p>Basically what I want to achieve is a match in the string of any of these options. Bearing in mind that I am passing in a variable which is something like (5.6 - 6.6) in this instance. Some of my values have "*" at the end and some don't so I need to test for when they do OR don't. But still need a match.</p>

<pre><code>MY CODE WHICH WORKS ON "5.6 - 6.6*"

fieldValuesArray[0] = "5.6 - 6.6"

myregexp = new RegExp("\\b(&lt;)?"+ fieldValuesArray[0]+"(\\*\\(\\)1234)?\\b")

testRegEx = myregexp.test("&lt;5.6 - 6.6**")  
  if(testRegEx == false){
  hide = "yes"
}
</code></pre>

<p>It works when there is no "&lt;" at the beggining but when there is one it wont find the value.</p>

<p>Hope someone can help.</p>
