perl regex modifiers

Alex Rice alrice at ARCplanning.com
Sat Jul 26 00:14:01 EDT 2003


On Friday, July 25, 2003, at 07:56  PM, Dar Scott wrote:

>
> On Friday, July 25, 2003, at 07:21 PM, Mark Brownell wrote:
>
>>   "perlRegEx = 13,  PNLP = 3" using:
>
>>   put "<perl>(.*)(</perl>)" into regEx
>
> I wonder if--by one making a few assumptions--this can be optimized.

The ".*" is the most general pattern and so it's the worst, performance 
wise. By restricting the pattern a bit we can speed it up. Using Mark's 
test case with "<perl>([^<]+)(</perl>)" the run-times are almost 
identical.

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
http://ARCplanning.com




More information about the use-livecode mailing list