RegEx Question
- 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
Can someone please help me with this problem?
I am trying to create a new account number by taking first 4 and last four digit. example 14620001-4015 >>>> 14624015
61310001-4015_D >>>61314015
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Without Regex you can use a data cleanse tool and remove letters and punctuation. Then you could get
left([field],4) + right([field],4)
cheers,
mark
regex_replace([field],"(\d{4}).*(\d{4})\D*",'$1$2')
regex101.com
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rrahu07
I hope this is the expected output. If not please explain me your requirement so that I can help you on how you approach the usecase.
Hope this helps : )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rrahu07
You can learn more about Regex from the below links
https://community.alteryx.com/t5/Interactive-Lessons/Parsing-Data-with-RegEx/ta-p/441415
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689
In addition to the above resources, you can use https://regex101.com/ as a sandbox for building and testing out regex. The tool is very intuitive for step-by-step regex building.
This should help you get started with the amazing journey of Regex 🙂
Hope this helps : )
