Symantec Access Management

  • 1.  Regex Expression to select specific patterns

    Posted Sep 11, 2017 06:00 AM

    Hello,

     

    I'm using CA Siteminder and I want to create an REGEX for a response.

     

     

    Input String :

     

    CN=aaaaaaa,OU=Applications,OU=GROUPS,DC=DOMAIN,DC=COM^CN=bbbbbbbb,OU=Applications,OU=GROUPS,DC=DOMAIN,DC=COM^CN=cccccccc,OU=Applications,OU=GROUPS,DC=DOMAIN,DC=COM

     

    Output:

     

    aaaaaaa ; bbbbbbbb ; cccccccc

     

     

    Any help on how to achieve this would be highly appreciated.

     

     

    BR 
    Sandipan



  • 2.  Re: Regex Expression to select specific patterns
    Best Answer

    Posted Sep 11, 2017 10:54 AM

    The expression (?<=CN\=).*?(?=\,) will match the values between "CN=" and ",".

    Allow me to introduce you to Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript, it's a good place to learn and test regex.



  • 3.  Re: Regex Expression to select specific patterns

    Posted Sep 12, 2017 05:30 AM

    Thanks...it worked out well...



  • 4.  Re: Regex Expression to select specific patterns

    Posted Sep 11, 2017 05:08 PM