Doesn't look obviously wrong, but you'd have to add enough logging debugging to the script to deermine where/when it's going wrong. I would inagine it's nothing to do with the SP identification part, more likely the regex. -- Scott