Ohh, it can nice. Thanks Steve, your posts have been a great help
Regards Dale Fraser -----Original Message----- From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Tuesday, 25 November 2008 5:57 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: RegEx Banging Head Take this for example <cfscript> link = '<a class="c" href="bla.html">link text</a>'; linkRef = refindNoCase("href=['""]?([^'""> ]*)['"" ]?", link, 1, true); </cfscript> <cfoutput> #mid(link, linkRef.pos[1], linkRef.len[1])# = href="bla.html" <br> #mid(link, linkRef.pos[2], linkRef.len[2])# = bla.html </cfoutput> ['""]? says that there does not have to be a ' or a " but if there is, include it. That way if its old crap html and it has href=bla.html the expression will still work ([^'""> ]*) says group up anything thats not a ', " > or [space] but they dont have to be there, but if you do find one use it as the terminator ['"" ]? says capture any one of those chars but it can be anyone and the all dont have to be there it will break though if the link path has a space in it but that is an invalid link anyway as they should be url encoded:) Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---