On 7/24/20 at 9:36 AM, [email protected] (Stephen Taylor) wrote:
Is there a way to do this in BBEdit? I hacked together a simple
javascript to do it, but then I have to run that as a local webpage;
MADEEKLP -> M,A,D,E,E,K,L,P, ...
Looks like a fairly simple thing to do with Find/Replace, e.g.,
Find:
([A-Z])
Replace:
\1,
[A-Z] matches a single upper case ascii letter.
The parens capture that matched letter.
The \1 in the replacement is that captured value (the first one,
and in this case the only captured value).
This will do most of your work, although you might not want the
comma at the very end after the the very last letter. And there
might be other edge cases.
If your JS script works well, note that BBEdit can run scripts
written with Apple's script editor, and - unknown to many -
Apple's Script Editor accepts scripts written in javascript as
well as those written in AppleScript. So you might want to check
that out. A script can often be more versatile and robust than
using find/replace.
HTH
--
- Bruce
_bruce__van_allen__santa_cruz__ca_
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/r480Ps-10146i-E42AE4044793418DACD1660623B8CCFB%40Forest.local.