This thread is part of the same script the OP has mentioned before, see extracting strings from text files and String contents. I remembered the older threads because city name in the sample data was familiar to me.
As alternatives to regexps, eq, substr, and index can be used.