Hi Experts,
Please suggest me regex to pick this number from this text.
Name | Alteryx Out |
12340 - SB - Sub Sub 0149 | 12340 |
23000 - Buy time Vusb Ltd-Vualto BV | 23000 |
12345 Earned rsed food sham:56789 Food | 56789 |
00000 - My Dep:13400 - Furniture Couch | 13400 |
20001 - Traffic Volvd Lab:20005 - Pen Control Water (34k) | 20005 |
Thanks in advance.
This simple formula will work
RegEx_Replace([Name],'^.*(\d{5,5}).*$','$1')
Although you did not give exact rules as to which numbers to extract, this pulls the last 5 digit string which applies to the example strings you provided.
The key is keeping the first .* greedy. This could be refined to only capture 5 digit words by using word breaks \b surrounding the match.