Quote from
Gaev on December 10, 2023, 5:04 pm
@phil78
1) A possible workaround would be to build a function that removes all non-numeric characters in the source string; this can be done purely with NeoScript commands, or more efficiently using Javascript and Regex. With both methods, plus and minus signs can be accommodated.
2) It becomes more complicated (but can still be done) when the numbers contain decimal points (dots or commas) requiring the function to separate these from regular fullstop and comma characters e.g.
Apples, Bananas on sale today. As low as $2.37 per Kg.
3) However, this solution will not work if your source string has multiple sets of characters and numbers e.g.
Some numbers like 1234 followed by some text and finally more numbers like 56.78
What do your expected source strings look like ?
@phil78
1) A possible workaround would be to build a function that removes all non-numeric characters in the source string; this can be done purely with NeoScript commands, or more efficiently using Javascript and Regex. With both methods, plus and minus signs can be accommodated.
2) It becomes more complicated (but can still be done) when the numbers contain decimal points (dots or commas) requiring the function to separate these from regular fullstop and comma characters e.g.
Apples, Bananas on sale today. As low as $2.37 per Kg.
3) However, this solution will not work if your source string has multiple sets of characters and numbers e.g.
Some numbers like 1234 followed by some text and finally more numbers like 56.78
What do your expected source strings look like ?