Removing all NON numbers from a data element
m.schonewille at economy-x-talk.com
Wed Jun 11 14:47:42 EDT 2014
This regex does what you want:
put "123-f-78-x0//" into x
Probably you will need a repeat loop, unless you really just have a list
of 500000 phone numbers. In that case you could use
replacetext(x,"[^0-9\n]","") to modify the entire list at once. I don't
know how long that would take, though. Just try it.
Economy-x-Talk Consulting and Software Engineering
Installer Maker for LiveCode:
Buy my new book "Programming LiveCode for the Real Beginner"
LiveCode on Facebook:
On 6/11/2014 20:23, Magicgate Software - Skip Kimpel wrote:
> Hello LC'ers
> 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
> if item 14 of tLine <> number then....
> There are about 500,000 rows of data to go through so my dilemma is to
> make the code as efficient as possible.
> Thank you for any input you might have!
More information about the Use-livecode