When you need the rule to be dynamic you do it this way to recompile the
regular expression:
<script type="text/javascript">
var txt="foo";
myRe= new RegExp (txt+"\\s", "i");
myArray = myRe.exec("The Foo fooSz Fighers");
alert(myArray)
</script>
Notice the \\. It just may be that your way would work with \\ in place
of \. But technique above does not require an eval statement.
--
E. Michael Brandt
www.divahtml.com
www.divahtml.com/products/scripts_dreamweaver_extensions.php
Standards-compliant scripts and Dreamweaver Extensions
www.valleywebdesigns.com/vwd_Vdw.asp
JustSo PictureWindow
JustSo PhotoAlbum, et alia
--
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************