I'm quite new to Regex, but have been testing and reading many online
articles that all seem to say the same thing, but it is not working for

I'm writing a rule to sync the InternetEMailAddress to ProxyAddresses in

In doing so it is important that only the Primary SMTP: address is

I have written a rule that outputs the ProxyAddresses to a NodeSet, and
then each node is checked to see if it is the primary - i.e. with the
capitals SMTP:

The rule below is evaluating to True for every smtp: address listed and
not just the SMTP: primary. I tried without the (?c) and get the same
result, so I must be missing something:

*<if-local-variable mode="regex" name="current-node"
<do-set-local-variable name="lvPrimaryAddressToUpdate">
<token-local-variable name="current-node"/>
<do-remove-dest-attr-value direct="true" name="ProxyAddresses">
<arg-value type="string">
<token-local-variable name="lvPrimaryAddressToUpdate"/>
<do-add-dest-attr-value direct="true" name="ProxyAddresses">
<arg-value type="string">
<token-text xml:space="preserve">SMTP:</token-text>
<token-op-attr name="Internet EMail Address"/>

Is anyone able to help at all?

Thanks in advance

Jevans78's Profile: https://forums.netiq.com/member.php?userid=7684
View this thread: https://forums.netiq.com/showthread.php?t=53965