From your CIW, type startFinder. This will open a the Cadence Skill API finder and allows you to search for available functions. Search for the string "tech" and you should find commands like:
techGetTechFile - for getting the techfile id ( techGetTechFile(geGetEditCellView())
techGetSpacingRule - for getting spacings and widths, done by keyword and pulled from the spacings section of the techfile
techGetDeviceInClass - for getting the list of vias
Look at cdnshelp for more details on running any of these commands.
In version 6.1.x you can use Perl regular expressions. Search for the various pcre commands. However, based on your description, it sounds like you were going to use this to parse the techfile and the techGet commands will be a better solution.