fork download
  1. t = "And on 3rd day, he created the 1st of his 22 books, not including the 3 that were never published - this was the 2nd time this happened."
  2. print(t.gsub(/\s*\d+(?!st|th|rd|nd)\s*/, " "))#=>And on 3rd day, he created the 1st of his books, not including the that were never published - this was the 2nd time this happened.
Success #stdin #stdout 0.05s 9648KB
stdin
Standard input is empty
stdout
And on 3rd day, he created the 1st of his books, not including the that were never published - this was the 2nd time this happened.