Re: Regex help with invalid HTML

2009-11-17 Thread Peter Boughton
I have no control over this code The only time parsing HTML with RegEx might be remotely viable is when you know what that code will be - if the HTML is uncontrolled then using RegEx is a futile effort. RegEx is for dealing with Regular text, and HTML is not a Regular language - even

RE: Regex help with invalid HTML

2009-11-17 Thread Mark Henderson
List wrote at 17 November 2009 14:32: Andy matthews, you're welcome. Ah hah, that's a name I'm more familiar with. testing Roger. And excuse the previously poorly formatted code (it looked ok at my end before sending but occasionally in Outlook 2007 when I copy and paste from external apps

RE: Regex help with invalid HTML

2009-11-17 Thread Mark Henderson
Peter Boughton wrote on Wed 18/11/2009 at 03:12: The only time parsing HTML with RegEx might be remotely viable is when you know what that code will be - if the HTML is uncontrolled then using RegEx is a futile effort. RegEx is for dealing with Regular text, and HTML is not a Regular

RE: Regex help with invalid HTML

2009-11-16 Thread Mark Henderson
Azadi Saryev wrote on 16 November 2009 at 17:58 you can do it with something like this: cfset line='trtd class=la href=/blah.com/atd31 622td25 623td193 645td840 642td1.9 GB' cfset cleanline = rereplace(line, 't[^]+', '|', 'all') cfoutput#listfirst(cleanline, '|')# #listlast(cleanline,

RE: Regex help with invalid HTML

2009-11-16 Thread lists
Andy matthews, you're welcome. -Original Message- From: Mark Henderson [mailto:m...@cwc.co.nz] Sent: Monday, November 16, 2009 4:29 PM To: cf-talk Subject: RE: Regex help with invalid HTML Azadi Saryev wrote on 16 November 2009 at 17:58 you can do it with something like

RE: Regex help with invalid HTML

2009-11-16 Thread lists
testing -Original Message- From: Mark Henderson [mailto:m...@cwc.co.nz] Sent: Monday, November 16, 2009 4:29 PM To: cf-talk Subject: RE: Regex help with invalid HTML Azadi Saryev wrote on 16 November 2009 at 17:58 you can do it with something like this: cfset line='trtd class=la

Regex help with invalid HTML

2009-11-15 Thread Mark Henderson
Calling all regex gurus. I've spent a little time on this so now it's time to seek advice from the professionals. Here is an example of the content I'm working with: trtd class=la href=/abc.co.nz/atd52 363td73 815td5 122 265td2 166 760td471.47 MB trtd class=la href=/xyz.co.nz/atd31 622td23

RE: Regex help with invalid HTML

2009-11-15 Thread lists
Will it always be a domain name you want to keep? And will the file size always be at the very end of the line? -Original Message- From: Mark Henderson [mailto:m...@cwc.co.nz] Sent: Sunday, November 15, 2009 8:38 PM To: cf-talk Subject: Regex help with invalid HTML Calling all regex

RE: Regex help with invalid HTML

2009-11-15 Thread Mark Henderson
lists wrote: Will it always be a domain name you want to keep? And will the file size always be at the very end of the line? Yes, and yes (confirmed all the TRs start on a new line). Regards Mark ~| Want to reach the

Re: Regex help with invalid HTML

2009-11-15 Thread Azadi Saryev
you can do it with something like this: cfset line='trtd class=la href=/blah.com/atd31 622td25 623td193 645td840 642td1.9 GB' cfset cleanline = rereplace(line, 't[^]+', '|', 'all') cfoutput#listfirst(cleanline, '|')# #listlast(cleanline, '|')#/cfoutput and if you do not want any html in final