Adam, that works perfectly!  The trailing comma won't matter since I use the 
ListToArray() function.
 
I was kind of close, but I forgot to escape the "|" therefore, I was "or-ing" my RE.
 
Thanks again!
M!ke

        -----Original Message----- 
        From: Adam Cameron [mailto:[EMAIL PROTECTED] 
        Sent: Mon 8/11/2003 4:30 PM 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: RE: Active Directory Query Service was: RE: [CFCDev] Component 
Critique Wanted
        
        

        Sorry, didn't see the reference to the pipe-delimited list in your code
        (not saying it wasn't there, just that I didn't see it ;-)
        
        <cfset testString = "CN=ThisGroup,OU=All Campus
        Email,OU=AcenetGroups,DC=evansville,DC=edu|CN=ThatGroup,OU=Unity,OU=Acen
        etGroups,DC=evansville,DC=edu|CN=ThirdGroup,OU=Unity,OU=AcenetGroups,DC=
        evansville,DC=edu|CN=FourthGroup,OU=Unity,OU=AcenetGroups,DC=evansville,
        DC=edu">
        <cfset RE = 'CN=([^,]+),[^\|]*(\|){0,1}'>
        <cfoutput>#reReplace(testString, RE, "\1,", "ALL")#</cfoutput>
        
        How about this?  There's a trailing comma, but other than that, seems to
        work.  I've been doing some really *nasty* REs in the last couple of
        days, so I guess my brain (such as it is) is tuned to them at present.
        
        Adam
        
        
        -----Original Message-----
        From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
        Behalf Of Dawson, Michael
        
        
        Adam, yes, that works great on a single "item".  How would you get it to
        work when there are more than one item such as:
        
        CN=ThisGroup,OU=All Campus
        Email,OU=AcenetGroups,DC=evansville,DC=edu|CN=ThatGroup,OU=Unity,OU=Acen
        etGroups,DC=evansville,DC=edu
        
        The pipe "|" is the delimiter returned from the CFLDAP query.
        
        In this example, I would want to return both "ThisGroup" and "ThatGroup"
        separated by commas.
        
        I'd love to be able to do this with a single REReplace function call. Is
        it even possible?
        
        Thanks
        -----Original Message-----
        From: Adam Cameron [mailto:[EMAIL PROTECTED]
        Sent: Sunday, August 10, 2003 8:25 PM
        To: [EMAIL PROTECTED]
        Subject: RE: Active Directory Query Service was: RE: [CFCDev] Component
        Critique Wanted
        
        
        >3. Thanks!  And may I say, REGULAR EXPRESSIONS ROCK!!!  One expression
        still stumps me.  In my attached ParseCNFromDN() method, I use Replace()
        and ListFirst() functions to strip all but the required information.  I
        wish I knew the RE that would do this for me with a single function. (An
        example of what I am needing is in the method's comment. Hint,
        Hint.)
        
        <cfset testString = "CN=md40, OU=Employees, OU=AcenetUsers,
        dc=evansville, dc=edu"> <cfoutput>[#reReplace(testString,
        "^CN=([^,]+),*.*","\1")#]</cfoutput>
        
        Seems to work.
        
        >The cool thing for me is, a lot of what I have learned on this mailing
        list is now coming to fruition!
        
        Absolutely.  I don't often post here because I generally feel somewhat
        overwhelmed by some people's knowledge, and my - seemingly - distinct
        *lack* of knowledge.  But as a lurker, I have learned an awful lot.
        
        
        ----------------------------------------------------------
        You are subscribed to cfcdev. To unsubscribe, send an email
        to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
        in the message of the email.
        
        CFCDev is run by CFCZone (www.cfczone.org) and supported
        by Mindtool, Corporation (www.mindtool.com).
        ----------------------------------------------------------
        You are subscribed to cfcdev. To unsubscribe, send an email
        to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
        in the message of the email.
        
        CFCDev is run by CFCZone (www.cfczone.org) and supported
        by Mindtool, Corporation (www.mindtool.com).
        
        ----------------------------------------------------------
        You are subscribed to cfcdev. To unsubscribe, send an email
        to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
        in the message of the email.
        
        CFCDev is run by CFCZone (www.cfczone.org) and supported
        by Mindtool, Corporation (www.mindtool.com).
        

<<winmail.dat>>

Reply via email to