in reply to Re: Help Needed
in thread Help Needed

Hi, RE: My file contains several occurence of "dn:" and I am only concerned with the first occurence and it will not be always dn: ou=CA, the value CA might change. Regards, Scott

Replies are listed 'Best First'.
Re^3: Help Needed
by rovf (Priest) on Feb 03, 2009 at 12:51 UTC

    Of course your value of CA will change, otherwise you wouldn't have to extract it! But what will be the general pattern between dn and CA? Is it always ': ou=' or something different?

    But in any case, with the solution I posted, I think you now know how to do it...

    -- 
    Ronald Fischer <ynnor@mm.st>
      Thanks, I am able to get it, but I dont get the results where I have "CA-ABC", instaed of "CA",

        Which regexp did you use to parse the value? You didn't tell us yet the syntax for the string after the '=' sign.

        -- 
        Ronald Fischer <ynnor@mm.st>