Thank you all for the replies.

> On Apr 16, 2017, at 5:53, Christopher Stone <[email protected]> 
> wrote:
> 
> A) Correct regex syntax (which Bruce kindly provided).

Sorry, my regex was indeed about removing stuff at the beginning *only* and 
since I could not figure how to make that work, I did not add the thing at the 
end (for which I did not think of using "or" to be honest).

Also, the dictionary says that "replace performs a Replace All", hence my idea 
that " * " was not required. But now that I check in BBEdit, I see that, well 
it words the same there... I must have done that millions of times in the past, 
how come I did not notice this ?!? Basically "Replace All" *just* means 
"Replace the matching string (here just *one* white space) in All lines"...

Now, if I add that OR end expression, I get exactly what I expect. And I 
thought I was not too bad at regex... :(

> For my own use I always employ the Satimage.osax for this sort of thing.

I'm doing this to add an "Open path in BBEdit" service, so BBEdit is supposed 
to be open (didn't somebody here point out that leaving the thing open at all 
times was *the* way to go? :) and since I am basically selecting only a few 
lines at a time, I should not have issues with performance.

> This job can also be handled nicely by AppleScriptObjC these days:

Yeah :)

This is really ugly :) But I guess that's a place from where I can start 
getting things done with ASObj-C...

Thank you again everyone.

Jean-Christophe

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to