Finding a substring within 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,
Appreciate if someone could help me with situation; this seems to be to be simple but I'm breaking a sweat.
Column 1 is what I have and column 2 is what I require; it always starts with text 'BudCod' and end with 4 digits total length is 10 and it can appear any part of the string
Column 1 | Column 2 |
2020-08-ALP-venodr-BudCod1234-B241 | BudCod1234 |
levelInfoBudCod1121, All- included | BudCod1121 |
Service vendor BudCod1217, all | BudCod1217 |
Supplier, excluding BudCod1351 | BudCod1351 |
BudCod1782 vendorlevelinfo | BudCod1782 |
levelInfoBudCod1020Allincluded | BudCod1020 |
BudCod13200120200812467595 | BudCod1320 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @PJ2020 ,
Here is an approach for the task.
Use below pattern in Regex tool tokenize mode.
BudCod\d{4}
Config
Output :
Workflow:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind😀👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @PJ2020,
I have provided you with alternative solution.
I have use findstring to find where 'BudC' is located and afterwards I have used substring to show the string that you are interested in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Interesting approach @Emil_Kos 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Haha... It happens even i overcomplicate things sometime too when there is a easier way possible.
But its a great way of learning 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Appreciate it! it's resolved the issue.
This is encouragement to explore more on RegEx, Thanks a Ton!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Happy to help 🙂
Cheers and happy analyzing 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hi @Emil_Kos,
Thank you so much!
Smart solution, super helpful!
