Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

Custom Rule using regexreplace

Last post 09-16-2010, 7:58 PM by dunnry. 1 replies.
Sort Posts: Previous Next
  •  09-08-2010, 1:03 PM 8539

    Custom Rule using regexreplace

    Hi,

    I am trying to convert an input value like "697461D705B7-F94D-A7CE-6CCCFD67E5B" to an output like "\69\74\61\D7\05\B7\F9\4D\A7\CE\6C\CC\CF\D6\7E\5B" using the custom rule

    c:[Type == "http://adfs.xxxxx.com/claims/UserGUID"]
    => issue(Type = "http://adfs.xxxxx.com/claims/UserGUID", Value = "{0}", param = regexreplace(c.value, "(\w{2})+)", "\${1}\${2}\${3}\${4}\${5}\${6}\${7}\${8}\${9}\${10}\${11}\${12}\${13}\${14}");

    but I and a syntax error/

    Any idea ?
  •  09-16-2010, 7:58 PM 8550 in reply to 8539

    Re: Custom Rule using regexreplace

    If you are trying to do a byte formatting operation for filters or the like, you can use the routines we published in the book's code.  We have it in Ch 5 I think - the one on searching.  I would not use the regex to do this.


    Ryan Dunn
    Extemporaneous Mumblings
    The .NET Developer's Guide to Directory Services Programming
View as RSS news feed in XML