How to "retrieve" only useful information in a long list

Ken Ray kray at sonsothunder.com
Fri Feb 3 11:31:56 CST 2006


On 2/3/06 8:58 AM, "alex wu" <alex298298 at yahoo.com> wrote:

Alex,

 You can also use regular expressions to do this:

  get matchText(tData,"(?s)FIXED WORDINGS HERE(.*?)ANOTHER FIXED WORDINGS
HERE",tVal)

and now 'tVal' contains the data between the two sections. If you want to
actually start on the next *line* after FIXED WORDINGS HERE and end at the
line before ANOTHER FIXED WORDINGS HERE, you can do this:

  get matchText(tData,"(?s)FIXED WORDINGS HERE\n(.*?)\nANOTHER FIXED
WORDINGS HERE",tVal)

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list