perl regex modifiers

Mark Brownell gizmotron at earthlink.net
Sat Jul 26 00:27:00 EDT 2003


On Friday, July 25, 2003, at 10:06  PM, Alex Rice 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.

now I get this for 5000 repeats:

perlRegEx = 29,  PNLP = 28

cool!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 635 bytes
Desc: not available
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030726/50d3d699/attachment.bin>


More information about the use-livecode mailing list