Filter a text string
Filter a text string
- Subject: Filter a text string
- From: Bert Groeneveld <email@hidden>
- Date: Tue, 11 Oct 2011 17:19:01 +0200
set myString to "The <letter>a</letter> quick <photo>12</photo> brown fox jumps <photo>150</photo> over the <mode>x</mode> lazy dog."
Is there a smart way to filter the above example text string so that it reads fine: "The quick brown fox jumps over the lazy dog."I want to get rid of all the xml tags as well as the content between the tags. The content between the tags is always different. And I have large text strings with sometimes many tags. Max 4 different tags (photo, letter, mode and number), but the content of the tags (between opening and closing text) can be anything.
I was thinking of a text delimiter approach and some grep search technique, but I should not know how to fix this at the moment.
Can anybody help?
Bert.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden