Hi Team
I have the below input and I'm trying to remove the last digits with '-+numbers' and the separate the AIC + numbers and AVC + numbers to C + numbers. Also those that don't have a AVC/AIC/C will be blank
This is my input :
Name |
189976 |
STP AYU AIC1234-5678 |
AIO-ARE AVC468-790 |
AIC RQU C1678 |
TYU AIE AIC1679 |
AHU AIR HUO |
The Output should be ref
Name | Ref |
189976 | |
STP AYU AIC1234-5678 | C1234 |
AIO-ARE AVC468-790 | C468 |
AIC RQU C16 | C16 |
TYU AIE AIC167989 | C167989 |
AHU AIR HUO |
Is this possible?
Hi @henrygeorge,
You will get new columns only when there will be C in the data followed by at least one digit.
The output:
Hi @henrygeorge ,
You can use a RegEx tool to parse an expression containing C and then one or more digits.
That's C\d+ as a regular expression.
Hope that helps.
Angelos
I like @Emil_Kos ’s answer but if there is ever a letter C followed by numbers for some reason somewhere before the end of the string, you may get extra information or an erroneous set.
To get more specific, I used the expression pattern of:
(?:AI|AV| )(C\d+)
If you still get extra info due to odd pattern followings, this one should take care of those pesky trailing information that tear up the ref#:
(?:AI|AV| )(C\d+).*?$
Good luck!
Glad that I could help @stephenrodgers1990