Rewrite rule please help me


I have a domain where i need a redirection as described below :


must redirect to

As you can see from the source URL ( i need the last four characters from the directory name

t-ABC-048796 i.e 8796 . Then it should redirect tocorresponding file under the directory named 8796 (last four characters of directory named t-ABC-048796 ) under i.e to the destination URL must be