I am not very familiar with regular expressions, and I'm wondering if someone
more knowledgeable could give me a hint as to how to accomplish this.
Given a passage of text, I need to find every instance of certain words within
that text and draw a box around them. The box drawing I can handle ju
On Dec 15, 2009, at 1:46 PM, Chris Sheffield wrote:
Can anyone help? Is there a way to do this? Or can someone recommend
another method of accomplishing the same thing?
Offset
--
Troy
RPSystems, Ltd.
http://www.rpsystems.net
___
use-revolution m
I am not either. but:
on mouseup
get fld "yourField"
repeat with y = 1 to the number of words in it
if word y of it = yourtext then set the textstyle of word y of fld
"yourField" to "box"
end repeat
end mouseup
Now this writes to fld "yourfield" every time it matches. I thin
Thanks, Troy. Unfortunately, offset doesn't quite work for me, as it does not
honor the wholeMatches property. So I might search for "use", and it would find
both "use" and "used", which is not the desired result. However, with some
extra code I could probably make it work (manually checking for
Here is one way. These are utility functions I use constantly for text
processing. Offsets(str,cntr) returns a comma-delimited list of all
the offsets of str in ctnr. Lineoffsets(str,cntr) does the same with
lineoffsets. Then you can interate over the list of offsets to do
whatever you want
Chris Sheffield wrote:
I am not very familiar with regular expressions, and I'm wondering if
someone more knowledgeable could give me a hint as to how to
accomplish this.
Given a passage of text, I need to find every instance of certain
words within that text and draw a box around them.
All I
Thanks to all who replied and offered suggestions. I ended up using the "find"
command on my field in order to accomplish what I need. While probably not
super speedy, it seems to be working well. Fortunately the story passages are
not too long, so the decreased speed is really not that noticeab
It seems that I have missed the good tread. Apologizes if it's a double
message ;)
To enclose a word without its punctuation you have to define a list of
substitute strings like this :
-> the list of possible form
" ",",",".",".",".."
-> the substitute list
"
",",",".",".",".."
With this approa