I have a file path such as /repo/java/projects/myproj in an Ant property. How can I remove /repo/java and store the result projects/myproj in another property?
I have a file path such as /repo/java/projects/myproj in an Ant property. How can
Share
The
pathconvertAnt task may be used with a nestedmapperto remove the first two directories from a path (or get the first two directories).Remove prefix
/repo/java/Match ‘/’ file separator
Output
Match platform file separator
Output
Get prefix
/repo/java/Match ‘/’ file separator
Output
Match platform specific file separator
Output