I have a string which is like ascv/zxc/zxc-asd/zx.java
now I wish to cut the string at second /
and get the String value as ascv/zxc
.
Similarly I will input the special character type and its level. Based on the input it should cut the string. E.g. from first match for character -
; or 3rd match of /
Any help is highly appreciated.