on 06-08-2016 10:00 PM
I am trying to extract only the text beyond the last delimiter in a string, and drop everything else.
For example:
AlphaText1:AlphaText2:AlphaText*
AlphaText1:AlphaText2:AlphaText3:AlphaText*
I only want the portion I have named AlphaText*, which may be following the 2nd, 3rd, or even 4th delimiter, which is ":".
I know I can split the data into 3, 4, or more columns, but I don't want anything but the alpha-numeric content that follows the last delimiter in the string.
Does anyone know what formula to use for this purpose?
Hi there!
A bit cryptic but more or less a "formula" is to use find with regex.
FIND REGEX ':([^:]+)$' in yourInputString
SUBMATCHES lastAlphaValue.
" lastAlphaValue contains your desired string part
Hope it helps,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm just slightly confused as to what to type as part of the formula, so I'll take a shot at a different example:
12345:12699:widgets_w/gadgets:12699-AA-BBBB
22345:22499:22499-AA-CCCC
CONFIGABCDE:ZBC999:ZBC999-QQ1-A53
All three of the examples above are contained in the data field {ItemFullName},so my guess as to what the formula would look like given your reply is as follows:
FIND REGEX':([^:]+)$' in {ItemFullName}
SUBMATCHES lastAlphaValue
Is this correct? The desired part of my alpha-numeric string is usually different and can be variable length.
The results I would be expecting would be:
12699-AA-BBBB
22499-AA-CCCC
ZBC999-QQ1-A53
Thanks!
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.