in src/PSDocs.Azure/Pipeline/PathBuilder.cs [114:123]
private static string SplitSearchPath(string path, out string searchPattern)
{
// Find the index of the first expression character i.e. out/modules/**/file
var stopIndex = path.IndexOfAny(PathLiteralStopCharacters);
// Track back to the separator before any expression characters
var literalSeparator = stopIndex > -1 ? path.LastIndexOfAny(PathSeparatorCharacters, stopIndex) + 1 : path.LastIndexOfAny(PathSeparatorCharacters) + 1;
searchPattern = path.Substring(literalSeparator, path.Length - literalSeparator);
return path.Substring(0, literalSeparator);
}