Regex Parse Null output
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I've created an Regex expression with regex101.com.
This expression separate the different components of a ModuleFullPath (crew list runner) into different columns.
The regex I created is as follows I created 6 groups
\\\\([A-z0-9$]+)\\([A-z0-9]+)\\([A-z0-9]+)\\([A-z0-9]+)\\([A-z0-9]+)\\([A-z0-9]+)
The ModuleFullPath consist of the following:
\\(server)\(topfolder)\(subfolder-1)\(subfolder-2)\(Altery main folder)\(Alteryx subfolder-1)\(Alteryx subfolder-2)\(optional-subfolder)\(Workflow).yxmd
I want to extract only the Alteryx subfolder-2. in my case this is always the 5th group.
What i don't understand is why this works on regex101 but not in Alteryx. That should be the same?
Note I know that this can also be done with the split to columns tool and put the \ as separator but i want to practice my Regex skills.
Solved! Go to Solution.
- Labels:
- Optimization
- Regex
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Regex formula would be
REGEX_Replace([Input], "\\\\([A-z0-9$]+)\\([A-z0-9]+)\\([A-z0-9]+)\\([A-z0-9]+)\\([A-z0-9]+)\\([A-z0-9]+)", "$4")
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@atcodedog05 Unfortunately I get the full input string back without the split.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@atcodedog05 I've created a sample string for this see codeblock. Also I've tested this sample string against my regex on regex101 and there it parse it (see screenshot). Also I've added the workflow from Alteryx as a screenshot
\\server01\d$\Alteryxsales\data_extract\alteryx\data\Sales\salesworkflow.yxmd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Happy to help : ) @MartWClimber
Cheers and have a nice day!
