I wanted to strip off the character starting from the 2nd underscore.
Example:
abc.2099-21-11_100101_299-09-76
Output I'd like to be:
abc.2099-21-11_100101
Any help will be very much appreciated.
Thank you.
Solved! Go to Solution.
@rjbrsh check out the attached sample workflow.
You may also be able to get ideas from this article:
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Remove-everything-after-the-first-hyph...
Hi @rjbrsh
There are a few ways to do this, one way is to use REGEX -
Something like REGEX_Replace([Input],"(.+_.+)_(.+)","$1") should work, just replace [Input] with your field name.
Regards,
Ben
A non-RegEx formula would be:
left([Field],length([Field])-findstring(reversestring([Field]),'_')-1)
This worked out for me. Thanks Ben, appreciate your help. 🙂