Page 1 of 1

Searching for text in a custom property

Posted: Tue Oct 09, 2012 3:17 am
by nextyoyoma
I have a text file (csv) with schedules in it, and I need to search a specific column for a specific word. I need to print the entire line in which the string is found. If I were doing this bash (what I'm most comfortable with), I would use awk, and it would look something like this:

Code: Select all

awk -F, '$3 ~ /myString/{print}' myFile
I realize I could just do that with a shell(), but this app is eventually going to be ported to iOS (maybe), so I want to do it completely in livecode if possible.

Re: Searching for text in a custom property

Posted: Tue Oct 09, 2012 5:54 am
by shaosean
A simple way would be to look for the word using the lineOffset function and then checking against the itemOffset or wordOffset function to ensure that it is in the right column..