| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| Bonjour Bernard, Here is one way with regular expressions. Note that {2,} allows for 2 or more occurrences 'new line'. You can adapt to your specific need, or simply use (\\n\\n). Also note that you may have to try with '\\p' or '\\r' depending on how the new line is coded in the original text. set theText to " aaa aaa aaa b " tell application "TextCommands" set theNewtext to theText as Unicode text set the theNewtext to (search theNewtext for "(\\n){2,}" replacing with "\\n" with regex) end tell theNewtext HTH, Michael On Nov 11, 2006, at 3:40 AM, Bernard Azancot wrote:
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users This email sent to email@hidden
| References: | |
| >Newbie search replace problem (From: Bernard Azancot <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.