title: Imacros for FireFox - Loop Inside EVAL
body: <p>I need to reload <code>URL</code> (in this case to refresh same page) until I don't have word beginning with capitalized A, B or C.</p>
  
  <p>How can I loop inside <code>EVAL</code>? Can somebody please provide me with some code example?</p>
  
  <pre><code>VERSION BUILD=7401110 RECORDER=FX
  TAB T=1
  URL GOTO=http://watchout4snakes.com/CreativityTools/RandomWord/RandomWord.aspx
  SET !EXTRACT_TEST_POPUP NO
  TAG POS=1 TYPE=SPAN ATTR=ID:tmpl_main_lblWord EXTRACT=TXT
  SET !VAR1 EVAL("var re = /^[A || B || C]/gi; var str = \"{{!EXTRACT}}\"; while(str.search(re) == -1) {URL GOTO=http://watchout4snakes.com/CreativityTools/RandomWord/RandomWord.aspx}")
  PROMPT {{!EXTRACT}}
  </code></pre>
  
  <p>I already asked on iMacros forum, but I don't have answer until now. </p>
  
  <p>With this part of code I need help, where <code>{{!EXTRACT}}</code> is extracted word (variable) from page. So, while <code>{{!EXTRACT}}</code> is not word that starts with uppercase letter A, B or C, I need to go again and again on the same <code>URL</code> (in this case to refresh same page):</p>
  
  <pre><code>var re = /^[A || B || C]/gi; 
  var str = \"{{!EXTRACT}}\"; 
  while(str.search(re) == -1) 
  {
  ***go to this URL***
  }
  </code></pre>
  
  <p>Thank you! :)</p>