Getting a value from variable

I want to extract a string from the variable value which is

Newpath="/home/user1/Projects/newone"

I just want to extract '/home/user1/Projects' from the above variable. I have used the following command

proj_dir=`echo $Newpath | sed 's,^.*//$,\1,'`

But sed garbled.

Thanks for the help

"\1" doesn't have anything to paste.

echo $Newpath | sed 's/^\(.*\)\/.*$/\1/'

In ksh/bash us the shell...

proj_dir=${Newpath%/*}

Try...

proj_dir=$(dirname $Newpath)