Upgrading Server to version 22.1? We’ve enabled the faster AMP engine by default. Read about how these system settings changes might affect you.

We’re aware of an intermittent issue with our My Alteryx login and are actively working to have the issue corrected. If you run into an error when logging in, please try clearing all cookies or accessing the community on a different browser. Thank you for your patience!

Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.


8 - Asteroid

Hi Experts,


Please suggest me regex to pick this number from this text.


NameAlteryx Out
12340 - SB - Sub Sub 014912340
23000 - Buy time Vusb Ltd-Vualto BV23000
12345 Earned rsed food sham:56789 Food56789
00000 - My Dep:13400 - Furniture Couch13400
20001 - Traffic Volvd Lab:20005 - Pen Control Water (34k)20005


Thanks in advance.

15 - Aurora




8 - Asteroid

This simple formula will work
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.