determining a plain text file

Mark Smith mark at maseurope.net
Tue Jul 11 04:13:27 EDT 2006


Jim, I certainly am not deprecating the use of RegEx - it clearly is  
just as powerful as you say. My point was the 'exponentially slower'  
on long strings -  if one is going to write a function to be called  
many times, or applied to arbitrarily long strings, the more lines of  
code approach may be more appropriate. As you say, 'in the right place'.

Best,

Mark

On 11 Jul 2006, at 01:00, Jim Ault wrote:

> The use of RegEx is very powerful in the right place.  The basic  
> idea is
> that the PCRE engine will travel through a block of text applying  
> rules
> rather than simply doing character comparisons.
>
> Short strings are fast and longer ones exponentially slower.  The  
> reason for
> this is usually that RegEx is a way of looking at patterns and  
> character
> types/classes rather than specific characters.




More information about the use-livecode mailing list