remove last word in label split by \
<p>Ok i have a string where i want to remove the last word split by \</p>

<p>for example:</p>

<pre><code>string name ="kak\kdk\dd\ddew\cxz\"
</code></pre>

<p>now i want to remove the last word so that i get a new value for name as</p>

<p>name= "kak\kdk\dd\ddew\"</p>

<p>is there an easy way to do this</p>

<p>thanks</p>
