Originally Posted by Seerah
Is there any benefit to doing it that way? The method briskman3000 and I posted seems about twice as fast when benchmarking. (Though the processing time probably doesn't matter much for the OP's needs.)
|
The OP only wanted commas between numbers removed, not all commas.
Using the OP's sample text:
Code:
"The number 45,678 is big, but 1,234 is small."
Kanegasi's result:
Code:
"The number 45678 is big, but 1234 is small."
Other result:
Code:
"The number 45678 is big but 1234 is small."