How to remove specific characters from a string
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I am pretty new to Alteryx.
I am trying to derive specific set of characters from the string mentioned in below table (input) column. I tried data cleansing tool, Substring and Trim function in formula tool but was able to get a clean output. I need the output in manner mentioned in output column in table below. Any suggestions will be of great help. Thanks.
Input | Output |
C006 - CBXYZAE9 | CBXYZAE9 |
C006 - CBXYZAE9 1/26/2021 | CBXYZAE9 |
C004 - CBXYZAE9 1/26/2021 | CBXYZAE9 |
C004 _CBXYZAE9 1/26/2021 | CBXYZAE9 |
CBXYZAE9 | CBXYZAE9 |
C006 | |
CBXYZAE9 1/7/2021 | CBXYZAE9 |
- Labels:
- Datasets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @deepnandi in your example below you could just check to see what cells contains CBXYZAE9, or is it more complicated than that, if not you could use this formula
IF Contains([Input], "CBXYZAE9") THEN
"CBXYZAE9"
ELSE
Null()
ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Better to have more data to see the patter, but if you already have the answer, we can do Find and Replace also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @deepnandi
I'm assuming over here that you do not know that the data will include "CBXYZAE9".
So I believe the best method would be to just the regex. We would need to understand how we can identify the expect string to be parsed.
I included below a couple of examples: Parsing knowing the string or Parsing knowing the beginning of the string
