Crap...you are 100% right. It does work that way...of course, I didn't post the entire snip of code...and...you know...sheesh...
I find everything about regex to be a pain...plus, I just can't understand them.
Anyways, I snagged this script from the manual, and apparently there is a reason for the /e to exist. Of course, I don't understand it...
Or, there could be another way to do this...but this approach 'seemed' rather efficient as it's nearly exactly what I need to do.
// remove spaces
$output = preg_replace("/\s/e" , "_" , $input);
// Remove non-word characters
$output = preg_replace("/\W/e" , "" , $output);
Edit...ok, now I get it...totally wrong approach here for what I need. I understand something I guess...
From the manual:
A "word" character is any letter or digit or the underscore character, that is, any character which can be part of a Perl "word". The definition of letters and digits is controlled by PCRE's character tables, and may vary if locale-specific matching is taking place (see "Locale support" above). For example, in the "fr" (French) locale, some character codes greater than 128 are used for accented letters, and these are matched by \w.
Thanks...