martes, 12 de mayo de 2009

Regular Expressions in Transport Rules (Exchange 2007)

Para el examen de certificacion de EXC07 me di a la tarea aclarar la duda sobre el manejo de reglas para administrar correos y contenido de correos tanto internos como externos.


En estas reglas se utilizan expresiones regulares para crear una platilla para por ejemplo bloquear que ciertos numero de cuenta con un formato en especifico pero con informacion variable no salga de la empresa.


He aqui un poco de informacion y la tabla de dichas expresiones.



What Are Regular Expressions?

First, you must understand what a simple expression is. A simple expression represents a specific value that you want to match with a condition or exception. A piece of data in an e-mail message must exactly match a simple expression to satisfy a condition or exception in transport rules.


A regular expression is a concise and flexible notation for finding patterns of text in a message. The notation consists of two basic character types: literal (normal) text characters, which indicate text that must exist in the target string, and metacharacters, which indicate or control how the text can vary in the target string.

Pattern string Description
\S The \S pattern string matches any single character that is not a space.
\s The \s pattern string matches any single white-space character.
\D The \D pattern string matches any non-numeric digit.
\d The \d pattern string matches any single numeric digit.
\w The \w pattern string matches any single Unicode character categorized as a letter or decimal digit.
The pipe ( ) character performs an OR function.
* The wildcard ( * ) character matches zero or more instances of the previous character. For example, ab*c matches the following strings: ac, abc, abbbbc.
( ) Parentheses act as grouping delimiters. For example, a(bc)* matches the following strings: a, abc, abcbc, abcbcbc, and so on.
\ The backslash ( \ ) is the escape character that is used together with a special character. Special characters are the following characters that are used in pattern strings:
• Backslash: \
• Pipe:
• Asterisk: *
• Opening parenthesis: (
• Closing parenthesis: )
• Caret: ^
• Dollar: $
For example, if you want to match a string that contains (525), you would type \(525\).
\\ Two backslashes are used when you want the backslash character to be recognized as a backslash and not as an escape character. For example, if you want to match a string that contains \d, you would type \\d.
^ The caret ( ^ ) character indicates that the pattern string that follows the caret must exist at the start of the text string that is being matched. For example, ^fred@contoso matches fred@contoso.com and fred@contoso.co.uk but not alfred@contoso.com.
This character can also be used with the dollar ( $ ) character to specify an exact string to match. For example, ^kim@contoso.com$ matches only kim@contoso.com and does not match anything else, such as kim@contoso.com.au.
$ The dollar ( $ ) character indicates that the preceding pattern string must exist at the end of the text string that is being matched. For example, contoso.com$ matches adam@contoso.com and kim@research.contoso.com, but does not match kim@contoso.com.au.
This character can also be used with the caret ( ^ ) character to specify an exact string to match. For example, ^kim@contoso.com$ matches only kim@contoso.com and does not match anything else, such as chris@sales.contoso.com.

No hay comentarios:

Publicar un comentario