Searching for text in a custom property

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
nextyoyoma
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 37
Joined: Sat Oct 06, 2012 6:29 am

Searching for text in a custom property

Post by nextyoyoma » Tue Oct 09, 2012 3:17 am

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.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Searching for text in a custom property

Post by shaosean » Tue Oct 09, 2012 5:54 am

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..

Post Reply