Re: Removing all NON numbers from a data element

2014-06-11 Thread Mark Wieder
Magicgate Software - Skip Kimpel skip@... writes: I have data element that I need to scan for all NON numbers and remove them. For instance this data element should read 0123456789 but sometimes is listed as 0123-4-5678-9 or has foreign characters in it or reads NOT AVAILABLE. so: if

Re: Removing all NON numbers from a data element

2014-06-11 Thread Mark Schonewille
Hi, This regex does what you want: on foo put 123-f-78-x0// into x put replacetext(x,[^0-9],) end foo Probably you will need a repeat loop, unless you really just have a list of 50 phone numbers. In that case you could use replacetext(x,[^0-9\n],) to modify the entire list at once.

Re: Removing all NON numbers from a data element

2014-06-11 Thread Alain Farmer
Use replaceText: put replaceText ( yourData, ^[0-9]*, empty) into yourData On Wednesday, June 11, 2014 2:25:11 PM, Magicgate Software - Skip Kimpel s...@magicgate.com wrote: Hello LC'ers I have data element that I need to scan for all NON numbers and remove them.  For instance this data

Re: Removing all NON numbers from a data element

2014-06-11 Thread Mike Bonner
Another version.. put replacetext(tData,(?!\n)(\D),empty) If there are lines with no numbers at all the list will end up with some empties, but those can easily be filtered out after the replacetext. This replaces everything except the newline and digits ( \d matches a digit, \D matches all