Richard, You need to pass variables to hold the start/end chunk in the matchChunk command (they don't need to have a value), but the regular expression needs to have parentheses around the value you want to look for so it can "extract" its location into the two variables. Like this:
on mouseUp local b,c put "abcdefg" & return & "hijk" into a put matchchunk(a, "(def)", b, c) into x put b && c && x end mouseUp Ken Ray Sons of Thunder Software Email: [EMAIL PROTECTED] Web Site: http://www.sonsothunder.com/ > From: Richard Adams <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Wed, 16 Jul 2003 16:50:38 +0100 > To: [EMAIL PROTECTED] > Subject: matchchunk > > Dear All, > > put "abcdefg"& return & "hijk" into a > put 1 into b > put 1 into c > put matchchunk(a, "def", b,c) into x > put b && c && x > > Gives ' true' > > I cannot work out what I am doing wrong here. I want to find the > location of matched text in a list but I do not get values returned. I > am sure there is a simple solution. Suggestions? > > Many thanks, Richard. > > > -- > Richard J Adams e: [EMAIL PROTECTED] > Department of Anatomy t: +44 1223 333782 > University of Cambridge f: +44 1223 333786 > Downing Street > Cambridge, CB2 3DY > UK > > _______________________________________________ > use-revolution mailing list > [EMAIL PROTECTED] > http://lists.runrev.com/mailman/listinfo/use-revolution _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
