Thanks Ray.Again a nice tartoiul.I downloaded the code, but when I compiled it, some errors occured. Because NSRegularExpression in the code is the classes provided by version iOS4.0, but which I used is iOS3.2. Which class shuould I use toreplace NSRegularExpression in iOS3.2 for achieving this function ?