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.

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to