Question: need to separate the string,i need to separate it.The String is dynamically add.

For Example 

```
1.String a="C:\Wowza Media Systems\Wowza Media Server 2.2.3\content\user2\weight.mp4" 

```

i need to separate it **user2**

```
2. String a="C:users\Wowza Media Systems\Wowza Media Server 2.2.3\content\user2\sample.flv"

```

So i added the value dynamically for **a**, but i need to separate the string before **weight.mp4** after **content** .

Answer: 
You Can approach like also..

```
String s="C:/Wowza Media Systems/Wowza Media Server 2.2.3/content/user2/weight.mp4";
String strArray[]=s.split("/"); 
String fileName = strArray[strArray.length-1]; /*weight.mp4*/
int index = s.indexOf(fileName); 
String path = s.substring(0,index) /*C:/Wowza Media Systems/Wowza Media Server 2.2.3/content/user2/*/

```
Are tried something like this?

```
a = a.replace("users", "");

```

It's kinda hard for me to explain because i don't know to much what are you trying to do.
Is it only avoiding "users" or adding or you try to do something more?