skylab2 — 2010-08-02T08:54:56-04:00 — #1
I would like to create a program which converts some letters into different ones. Here is the idea.
1) I want 2 text areas (input and output) + "convert" button
2) if I type in the input area the letters "ea" I would like it to be converted into "a", so that If I type "cambrea" and press "submit" the output text will have "cambra".
3) if I type "e " which is (e+space) I want it to be converted into " " which is "space" example: if I type the word "spine " it should be converted into "spin , note that there is a space after "spin ".
4) If I type any vowel before "o" it should render "o", example: gambuo becomes gambo.
paul_wilkins — 2010-08-02T23:29:29-04:00 — #2
Regular expressions are possibly what you're after.
You can then use a regular expression with the the replace method to achieve the replacements that you're after. You can also use straight string replacement too.
Is this for a course that you're taking? Or is there some data-set that needs to be converted. If the latter, we should be able to help you find pre-existing solutions that already exist in the wild.