---
title: segments
framework: networkextension
role: symbol
role_heading: Instance Property
path: networkextension/neurlfiltermanager/parsingconfiguration/pathoptions/segments
---

# segments

The number of path levels to preserve when parsing.

## Declaration

```swift
var segments: UInt
```

## Discussion

Discussion With a path of /a/b/c/d, setting segments to 2 keeps /a/b. Use a value of 0 to keep all path segments.

## See Also

### Working with path options

- [excluded](networkextension/neurlfiltermanager/parsingconfiguration/pathoptions/excluded.md)
- [enumerateHierarchy](networkextension/neurlfiltermanager/parsingconfiguration/pathoptions/enumeratehierarchy.md)
