तीन इनपुट लें, पाठ की एक स्ट्रिंग T, पात्रों की एक स्ट्रिंग को बदलने के लिए F; और वर्णों की स्ट्रिंग, के साथ उन्हें बदलने के लिए R। प्रत्येक T(केस असंवेदनशील) वर्णों के विकल्प के रूप में F, उन्हें वर्णों के साथ बदलें R। हालाँकि, मूल पाठ के समान ही मामला रखें।
अगर वहाँ में और अधिक चरित्र Rकी तुलना में Fके रूप में वे कर रहे हैं, अतिरिक्त वर्ण इसी मामले होना चाहिए R। यदि संख्याएँ या चिह्न हैं F, तो संबंधित वर्णों को Rउनके पास मौजूद मामले को रखना चाहिए R। Fजरूरी में दिखाई नहीं देगा T।
आप मान सकते हैं कि सभी पाठ मुद्रण योग्य ASCII रेंज में होंगे।
उदाहरण
"Text input", "text", "test" -> "Test input"
"tHiS Is a PiEcE oF tExT", "is", "abcde" -> "tHaBcde Abcde a PiEcE oF tExT"
"The birch canoe slid on the smooth planks", "o", " OH MY " -> "The birch can OH MY e slid OH MY n the sm OH MY OH MY th planks"
"The score was 10 to 5", "10", "tEn" -> "The score was tEn to 5"
"I wrote my code in Brain$#@!", "$#@!", "Friend" -> "I wrote my code in BrainFriend"
"This challenge was created by Andrew Piliser", "Andrew Piliser", "Martin Ender" -> "This challenge was created by Martin Ender"
// Has a match, but does not match case
"John does not know", "John Doe", "Jane Doe" -> "Jane does not know"
// No match
"Glue the sheet to the dark blue background", "Glue the sheet to the dark-blue background", "foo" -> "Glue the sheet to the dark blue background"
// Only take full matches
"aaa", "aa", "b" -> "ba"
// Apply matching once across the string as a whole, do not iterate on replaced text
"aaaa", "aa", "a" -> "aa"
"TeXT input", "text", "test" -> "TeST input"
"The birch canoe slid on the smooth planks", "o", " OH MY "इतना हास्यप्रद क्यों लगा , लेकिन मुझे वह उदाहरण बहुत अच्छा लगा।
"TeXT input", "text", "test"