Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a substring I need that is embedded withing a larger string. The sting follows this fomat:
ABC 1234 Microsoft (need to extract 1234)
DEF Q7 1234 Android (Need to extract 1234)
GHI H3 1234 Apple34 (Need to extract 1234)
The string I need to extract is always 4 numbers long and has either 3 letters in front of it with a space or 3 letters, a space, a letter and a number, and another space. The string after the space is always inconstant and can contain letters and numbers.
Is there an expression that can pull the substring out?
Thank you
Using the data below:
Data:
load Str,
If(IsNum(SubField(Str,' ',2)),SubField(Str,' ',2),SubField(Str,' ',3)) as N;
Load * Inline [
Str
'ABC 1234 Microsoft'
'DEF Q7 1234 Android'
'GHI H3 1234 Apple34'
];
Thank you for the response! Would this work if there were thousands of entries? Is there a way to do it without listing them all? I am pulling this data in as a dimension.
Also, is this possible to do with a calculated field?