Steve,

That causes an error.  What's the '<' in between the '?' and '!'
supposed to do (a typo?)

Ian,

Try this:

<cfset MyString = "</organization> <title>">
<cfset MyResult = ReFind("(</organization>)(?!\s*<title>)",MyString, 1,
"yes")>
<cfset MyResult2 = ReFind("(</organization>)(?!\s*<div>)",MyString, 1,
"yes")>
<cfoutput>#MyResult.pos[1]#<br>#MyResult2.pos[1]#</cfoutput>

MyResult = 0 because there was a <title> tag, MyResult2 = 1 because it
looked for a (which wasn't there) <div> tag.    So you could throw that
in a <CFIF MyResult gt 0>, or whatever suits your needs.  Is that what
you were looking for?

> -----Original Message-----
> From: Steve Brownlee [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 05, 2006 3:27 PM
> To: CF-Talk
> Subject: RE: Regex ex question. How to match NOT this string.
> 
> Just one correction
> 
> (</organization>)(?<!\s*<title>) 
> 
> > -----Original Message-----
> > From: Ben Nadel [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, January 05, 2006 5:23 PM
> > To: CF-Talk
> > Subject: RE: Regex ex question. How to match NOT this string.
> > 
> > I am a bit rusty, but maybe something along this line:
> > 
> > (</organization>)(?=!\s*<title>) 
> > 
> > This might not be the correct syntax, but I mean to say find 
> > </organization>
> > if only there is a negative look ahead for the expression 
> > "\s*<title>".
> > 
> > This might help spark some other people's better answers.

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228580
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to