IBM interview question

Write a program to take input as a string and do manipulation like reverse it ,pattern matching etc