I have a program that uses two regex expressions. The two expressions are the same (I'm using them to extract the values from two of the columns). I have tried to precompile the regex to run faster with qr, but either I'm doing it wrong, or it's not actually running faster. I would like to speed up this program and would love any help. Thanks in advance.

I do not think you are doing anything wrong. Regular expressions which do not require interpolation are compiled at the same time as the rest of your perl. The qr operator is unlikely to offer any advantage in speed.

The book "Mastering Regular Expressions" addresses the issue of faster regular expressions. In general, I find most of its advice to be to complicated to be practical. If the issue is really important it may be worth the effort.

I would experiment with different approaches. Perhaps you can parse your data by spliting on tabs. Good Luck, Bill

Sorry, I cannot offer any real help. If most of your strings do not contain useful data, it may be faster to test without capturing parens. Retest only the matching strings with the parens. Specify the possible number of digits with \d{min,max} rather than \d+. Good Luck, Bill