On Sep 20, 2022, at 10:46, Lionel <att...@free.fr> wrote:
A call to the AppleScript library of BBEdit sometimes returns the number of hits found, this is the case with replace.
process lines containing text 1 of text document 1 matching string "^'" output options {deleting matched lines:true} with matching with grep
But with "process lines containing text" for example, this is not the case and it is better to avoid testing the returned value. It must be somewhere but not in the global property « result ». If someone has a solution, I'm interested.
On Sep 26, 2022, at 08:22, Lionel <att...@free.fr> wrote:AppleScript is not really a friend of regex ;-) You have to test the text to transform with BBEdit and then translate it into AppleScript string to incorporate it into the script.
And sometimes it doesn't work, for example with \x20{6} supposed to replace six spaces. Is there a way to enter in AppleScript the same plain text used in BBEdit, with a tell statement for exemple ?