oh, and just a few informational bits i forgot to include in my previous post (cant seem to locate the edit function?)
this:
oRE.Pattern = "[\W_]"
is the same as this:
oRE.Pattern = "[^a-z0-9A-Z]"
not exactly sure how they equate, but i use the second method since its more familiar to me.
also - the reason there are so many " in my string, its because i don't want the script to remove them, but you
cant use the escape char like this:
oRE.Pattern = "[^a-z0-9A-Z, @-_\r\"]"
you have to quote the quotes to include them:
oRE.Pattern = "[^a-z0-9A-Z, @-_\r""""]"
(made me laugh a little when i tried it and it actually worked...)
works on most file types - no xls.
to alter the code to work for xml files, so it doesnt remove the tags, make the pattern look like this for example:
oRE.Pattern = "[^a-z0-9A-Z, @-_\r""""<>/]"