Hello,
Text String;
"The very Blue Sea is always blue unless its orange when its not BLUE sea"
The idea is to split on every "blue" regardless of case to give:
The very | Blue Sea is always | blue unless its orange when its not | BLUE sea |
This works in Reg101 but not in Regex as to parse it gives the error: "Error: Nothing to parse. Enter a complete expression."
Code is:
(?i)\s+(?=\bblue\b)
Thank you
Solved! Go to Solution.
Hi @Bobbins
Reg101 doesn't handle parse hence you are getting this issue in Alteryx.
Hope this helps : )
Thanks thats one way to solve it, can you use Regex to do the same so i can keep the case of what i am breaking up?
Hi @Bobbins
In your scenario you are breaking on n number of blues and also first column doesn't have blues hence its bit tricky.
@PhilipMannering do you have any suggestions on this.
Hope this helps : )
What you are doing is tokenizing since you are taking one column and splitting it into multiple components. Alteryx tokenizing supports exactly 1 marked group. You have two marked groups - hence this is not doable in Alteryx.
On a purely matched group process - you can see that you have 3 matched groups if you use:
REGEX_CountMatches([Field1],"(?i)\s+(?=\bblue\b)")
I would also note - that regex 101 gives you match information (ie the number of matches) but it does not show you the values of those matches (like you would expect to see from a succesful Regex tokenizing) see the difference between your expression and say:
(\s\w+\s)
where every match in Regex 101 also returns a group.
Thank you kindly, thats a different way to how i was thinking it could be done!
@atcodedog05 Thank you also for your help :-)