I have been doing some testing with the differences between JavaScript and PHP regular expressions and "I believe" that the following 2 expressions are pretty much exactly the same thing, but I would like to ask the gurus here to confim this or not before I add these to my production code.
PHP Version
preg_replace('/[^a-zA-Z0-9\.\-\_]/', '_', $str);
JavaScript Version
str.replace(/[^a-zA-Z\d\.\-\_]/g, "_");
Thx,
Dave Keltz