我试图从NSString中删除转义字符等

时间:2010-09-16 16:31:28

标签: iphone objective-c

我有一个NSString,里面有转义字符等。我需要清理这块NSString,以便我可以将它显示给用户。任何人都可以帮我解决这个问题。

这有点棘手,因为它不是HTML格式的转义HTML格式

hotel description <B>Description</B>Friendly and laid-back, the de Alcudia is perfect for a relaxing getaway. Set in pleasant grounds, this complex is about as welcoming as they come. Offering its guests a friendly atmosphere and superbly located on Alcudia's fabulous sandy beach, you can choose to either soak up the sun by the sea, or down on the lovely sunbathing terrace which surrounds the swimming pool. Then, when you're feeling a bit more energetic you can take advantage of the many facilities on offer!<B>Facilities</B>- Swimming pool - FREE ®sunbeds and parasols - Internet access - Laundry service - WiFi access<B>Meals and Drinks</B>- Buffet-style restaurant - Show cooking (breakfast and dinner) - Pool bar serving snacks - Lounge bar with satellite TV<B>Activities</B>- Table tennis - Football - Water polo - Beach volleyball - Billiards<B>Entertainment</B>- Daily day and evening entertainment - Shows<B>For Children</B>- Section of the main swimming pool - Hotel kids' club (4-12 years) - Playground - Buggies - Cots<B>Accommodation</B>One bedroom apartment for up to 4 adults consists of® - Twin room - Lounge area with 2 sofa beds - Kitchenette - Fridge - Coffee maker - Toaster - Satellite TV - Safety deposit box- Bath, shower and wc - 2 ceiling fans - Balcony - Maid service 5 times a week- Sea view apartments available at a supplement®<B>Key Facts</B>- Opposite the beach - Main resort area: 2 kms- Nearest supermarket: 1 km- 217 rooms - Lifts: 3 - Child age: 2-16 years - Telephone no: 00 34 971- Official rating: 3 key<B>Brochure Name</B>Aparthotel de Alcudia<B>Key Facts Notes</B>Some facilities and activities may incur a local charge

1 个答案:

答案 0 :(得分:2)

其中唯一的HTML转义字符有><。为什么不做一个简单的搜索&取代

如果您需要更复杂的内容,请尝试阅读此question/answer