>If you actually meant "/$" as a regex, so that it removes the last character 
>of $path, if it's a /, you can keep  that and do:
>
>$strLog = ([regex]::Replace($path, "/$", '')).Replace('/','_') + '.log'
>
>So, if $path = "/cygwin/c/windows/", then $strLog = "_cygwin_c_windows.log".

Cool, I shouldn't have abbreviated as I have a few. For example, how can I 
actually do multiple regex's
on one line, you did a .replace but if I had to do 3 more real regex's, how do 
you join them?

([regex]::Replace($path, "/$", '')) and ([regex]::Replace($path, "foo", "bar")) 
but I needed regex's not replacements.

Thanks so much!
jlc

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to