Hello Derek,
Thank you for the confirmation. Find the script below. In the script, the $propertyName variable specifies the LDAP name of the property whose value will be updated.
$propertyName = "mail" # TODO: modify me
# Get property value
$value = $Context.GetModifiedPropertyValue($propertyName)
if ([System.String]::IsNullOrEmpty($value))
{
return # The property wasn't changed
}
# Replace characters
$value = [regex]::Replace($value, "(?i)[^a-z0-9\@\.]", ".")
# Update property value
$Context.SetModifiedPropertyValue($propertyName, $value)