It looks like I'm trying to reinvent the wheel, but I can find a way to do this:

1) replace ^\s with nothing
2) replace \s$ with nothing

in a single string

The following lines don't work, because of the "^":

set pathstring to "             /path/to/my file.stuff  "

tell application "BBEdit"
        replace "^\\s" using "" searchingString pathstring options {search 
mode:grep}
end tell

But when I remove the "^", the space within the path is also removed, which I 
don't want.


Also, I find it's too bad the remove prefix/suffix/prefix and suffix don't have 
a grep option.

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