--- In [email protected], "brucexs" <[EMAIL PROTECTED]> wrote: > > If blank is still one of the delims, you can use something like > for each word w in str.replacechars(",:.;?! ") > > if blank is not a delim, then you could use > for each word w in str.replacechars(" \02").replacechars(",:.;?! ") > w=w.replacechars("\02 ") > > although it is probably simpler just to use > for (w=str.nextword("str",delims);w;w=str.nextword("str",delims))
I will try those, thanks. > > Of course, you would most likely use a regexp, not replacechars <g>. > I generally use regex.pcrematchall to extract substrings into a vector. But I'm having some problems with a newish script, possibly with vector handles that get reused multiple times in the script (inside a "for each line"). Regex starts throwing errors during the 16th time I run my script! At that point I have to restart Powerpro. The script is attached to a button I'm clicking alot, so a frequent problem. If I move the offending regex into its own script, I can run it 16+ times with no errors at all. e.g., local ov=vec.create(10,1) regex.pcrematchall(?"\x22(.+?)\x22(?:,|$)",other, ?"$1", "", 0, ov) That extracts to ov elements substrings that are preceded by a doublequote and followed by a doublequote+comma or doublequote at the end-of-the-string. Regards, Sheri
