How to find and remove string in front of URL?
I see many problems in the code you posted in your question. First of all, you are missing a parameter in preg_replace. Take a look at the PHP documentation.

Second, you have no delimiters in your pattern. The correct pattern should be:

$patt = '/.+\//';

(You don't need the parenthesis, but you do need delimiters such as slash bars. See this).

Third, preg_replace() returns an array with the replacement. You need to assign the result to $alias, as in $alias = preg_replace(...)

I have not use this hook before, but keep in mind (from the description) that this is only invoked before the alias is saved.