I am designing a text translator in which I have to replace a array of string to another string :
Illustration:
cmptr is an elctrnc mchn
It should be translated to : computer is an electronic machine.
(Irrespective of the case-senitivity)
Can anyone help me?

If you're using Linux/Unix you could use sed. The command to change "cmptr" to "computer" would be:

sed 's/cmptr/computer/g'

I'd suggest using a loop to go through all the words you want to check for. Linux Config's Bash Tutorial should cover everything you need to know to set up arrays and loop through them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.