Use Cases -- How We Would Benefit From this Request
Replace Only the First Match in a Complicated String
There are many times where we do NOT want to replace ALL of a given text (or Regex pattern) in a string.
For example, the header portion of a long text document (string) where I just want to replace some key terms in the header, like "Author", but NOT in the body of the document.
Make sure the string end with only one LF, whether the source string has none, or many LF at the end.
Anyone who has ever used BBEdit to clean up a document will understand this.
While we could use tools outside of KM to do this, the point of KM is to make it easier for everyone, including those who don't script, and don't have other tools.
I want to use KM to automate the routine cleanup of documents/email/downloads that I receive.
@peternlewis, please consider this request in the broadest terms of how it might be used.
Thanks.
Every language/app I know of, that supports RegEx, allows the user to perform a Regex Replace with Global matches either on or off.
KM does NOT provide this, and thus produces unexpected results for this simple use case:
Use Case #2
Ensure that String Ends with One, and Only One LF
In this example, I will use a bullet • in the results to make it easier to read.
Though I'm not against this, I hope Peter puts this on the back burner, because there are many things that are more important. An easy workaround is to use the "Apply a BBEdit Text Factory" action.
Each of us have our own priorities, our own preferred new features.
I did not ask Peter to prioritize my request. That is his job to determine which new features will benefit the most uses and/or might attract new KM users.
If it's true that you have come around to that way of thinking, then that is somewhat heartening. You certainly didn't hold that view in the past, when you would dismiss my feature requests as unworthy of Peter's attention simply because you didn't think you would ever use them (and erroneously presumed that no one else would, either).
To be clear to all, my "way of thinking" about enhancement requests has not changed. I have always thought that it was up to Peter "to determine which new features will benefit the most users and/or might attract new KM users."
We are now several posts off-topic. I hope we can stop now. If you have any complaints about me, please feel free to communicate them privately to Peter.