Text to columns, separate everything after the 4th "\" from a string
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
wonka1234
10 - Fireball
‎11-21-2022
07:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Is there a way I can separate everything after the 4th "\" from a string?
Ie. O:\Alteryx\community\2023\nov\20\test would become O:\Alteryx\community\2023\nov ?
Thanks
Labels:
- Labels:
- Custom Tools
6 REPLIES 6
ShankerV
17 - Castor
‎11-21-2022
07:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ShankerV
17 - Castor
‎11-21-2022
07:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
gautiergodard
13 - Pulsar
‎11-21-2022
07:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
ShankerV
17 - Castor
‎11-21-2022
07:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @wonka1234
Step 1: Input tool
Step 2: Text to columns tool
Step 3:
[1]+'\'+[2]+'\'+[3]+'\'+[4]+'\'+[5]
Step 4:
Output:
Many thanks
Shanker V
ShankerV
17 - Castor
‎11-21-2022
07:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
DataNath
17 - Castor
‎11-21-2022
08:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @wonka1234 here's one possibility with RegEx that will take everything up until the 5th slash:
((?:[^\\]+[\\]){1,4}[^\\]+)