Lets have this String for example:
"C:\Users\User\workspace\Iterator\src\Iterate_Choose.java"
"C:\Users\User\workspace\Iterator\src\testing.java"
How can I get the string just after src\ and before .java. The output should be like this:
Iterate_choose
testing
I tried looking for regex but cannot find one that matches this situation.
You can use a regexp or look for the positions of the relevant parts: