On 17/10/2012 23:10, Oliver Taylor wrote:
Is it possible to test the found text*of* nextChar as regex?

If you can point me in the right direction, I'd be grateful.

*tell* /application/ "BBEdit"


--look at the next character
*set* nextChar*to* *find*"." searching in/text/*of* *front* /text window/options{search mode:grep, wrap around:false}


*if* found text*of* nextChar= " " *then* --should also test for punctuation


You don’t need to use regular expressions but rather do something like this:

tell application "BBEdit"
  set _matched_chars to {space, tab, "\"", "'"} -- etc.
  set _nextchar to (characterOffset of selection)
  tell the text in the front text document
    set _char to (character _nextchar as string)
    if _char is in _matched_chars then
      ------
    end if
  end tell
end tell

--JD

--
--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
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>



Reply via email to