Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Formula needed to remove non numeric from a numeric field

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Formula needed to remove non numeric from a numeric field

Jun 8, 2016 11:37 AM
(1948 views)

Is there a formula to remove a non numeric from a numeric data field ?

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Formula needed to remove non numeric from a numeric field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Formula needed to remove non numeric from a numeric field

See examples below. The first removes everything but integers. The second allows for decimal numbers (assuming period as delimiter).

Formatted numerics such as dates or scientific notation require a little more complex search string.

pi=":3b@./14Q15%9";

num**(**Regex**(**pi, "[^0-9]+", "", Globalreplace**))**;

num**(**Regex**(**pi, "[^0-9.]+", "", Globalreplace**))**;

Edit: just learned this has posted before. See Craige's excellent post in this thread Extract numbers from string in JSL