SOLVED
Extract Number from a String
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
lac
7 - Meteor
‎03-21-2022
09:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
Can someone please help? I'm trying to extract numbers from a field that are followed by the letters CY.
so in this example i only want to extract the numbers 2020 from the string below. This number will change but will always be followed by CY or cy
U9898 Happy go lucky until 2020CY or until today 321 |
Solved! Go to Solution.
Labels:
- Labels:
- Regex
3 REPLIES 3
17 - Castor
‎03-21-2022
09:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @lac
Here's 2 ways, one regex, one text parsing:
Regex: .*(\d{4})CY.*
Formula: tonumber(substring([Field1],findstring(UPPERCASE([Field1]),'CY')-4,4))
binuacs
21 - Polaris
‎03-21-2022
09:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎03-21-2022
09:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you this was super helpful
