Paolo Piponi wrote:
BTW although this seems to have been resolved, there is another way of handling the ".*" problem in regular expressions.
The problem is that "<tr[^>]*>.*</tr>" will capture anything, including duplicate occurances </tr> inside the .*
So, instead, you take the string you are searching and convert all instances of "</tr>" to a single rare character, e.g. "~". You would probably use a rarer character but for this email I didn't want to screw up the email's character set.
So, you run these two expressions:
rereplacenocase(text,'</tr>','~','All') refindnocase(text,'<tr[^>]*>[^~]*~') ..and convert back if necessary.
Make sense? Anyone know a better way?
I would still stick with the find and loop case unless performance was an issue. I would suggest that the above is less maintainable and readable than the find and loop I suggested earlier, so for ease of use, although not necessarily performance I would go with the find and loop.
It's a case of readability, maintainability, simplicity against performance and "aren't I a good programmer" syndrome! ;)
Paul
-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by
activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*To unsubscribe, e-mail: [EMAIL PROTECTED]
