Ranjan,
If the VFP code took 20 minutes to process a 25mb file the code was not written in a very efficient manner. Don't blame VFP for that sort of fault. It probably could have been written in a manner that would execute within a few seconds. It still wouldn't be as fast as the underlying C/C++ code being executed inside the regexp utility.
>Doing this with vbscript is a lot easier and faster. I once needed to convert a file with generated by a telephonecentral and needed to put a CR in between two telephone numbers. I used VFP and a 25 Mb file took over 20 minutes. Someone pointed me towards vbscript and regular expressions and that did the same trick (with a pattern) under 2 seconds. Why should this be done explicitly by VFP. Some tools sometimes perform faster.