Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

String handling

7 views
Skip to first unread message

Robert L.

unread,
Nov 30, 2016, 4:27:41 PM11/30/16
to
Problem: a string contains a number. Replace that number
with another number that has more digits.

Ruby:

s = "The number 76 is in this sentence."

s[ /\d+/ ] = "1984"

p s
===>
"The number 1984 is in this sentence."


In Forth?

--
The former leader of the National Front Jean-Marie Le Pen was fined 30,000
euros for exposing the Jews' Holocaust gas chamber hoax.
infostormer.com/jean-marie-le-pen-fined-30000-euros-for-exposing-jewish-holocaust-gas-chamber-hoax
0 new messages