Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Looking for help here on how to remove all string after a delimiter.
For example i have a data with the value: ht/w.domaindomain.c/pathpath
and i want to remove all the strings after the delimiter last '/'
the results would be : ht/w.domaindomain.c
Please assist. Thanks!
In a Prepare recipe, use the Smart Pattern Builder to extract the text, as explained in this page, https://knowledge.dataiku.com/latest/courses/advanced-data-prep/prepare-recipe/smart-pattern-builder...
I hope this helps.
With this regex expression, we are forming two groups including everything before the last forward slash and everything after and then taking the second group and output as the value in the cell.
If you are looking for a more detailed explanation of the regex, there are many resources on the internet available. The one I use mostly for regex expression testing is https://regex101.com/. If you copy-paste the expression into the regular expression field, you will see a good explanation of what the expression does in the right pane.
Hope this helps,