Matches either colour or color, because the ? makes the letter u optional. For example, the following regular expression: Matches punctuation characters and symbols: Matches visible characters only-that is, any characters except spaces, control characters, and so on. Note: This character class must be surrounded with another set of square brackets when you use it in a regular expression, for example: ]. Any character (may or may not match line terminators) d, A digit: 0-9 D, A non-digit: 0-9 s, A whitespace. Matches alphanumeric characters (letters or digits): Summary of regular-expression constructs. Matches any character that’s not a letter from a to f Matches any character not in the set of characters. Note: Regular expressions in Content Compliance policies are case sensitive. Separate the first and last character in a set with a dash. Character Classes (direct link) Anchors and Boundaries (direct link) POSIX Classes (direct link) Inline Modifiers None of these are supported in JavaScript. Matches any character from a set of characters. matches a literal period, rather than any character (dot character) Indicates that the next character is a literal rather than a special character. (pipe) Indicates alternation-that is, an “or.” For example: (dot) Matches any single character, except a new line. For example, a content rule with a location Subject line and the following regular expression:Ĭaptures any email message that has a subject line ending with the letters xyz But if you want to search for the dot symbol, you need to escape it with \, so this RegEx will only match the exact text 'b.t': b\.t 2). (dollar) Matches the end of the line or string of text that the regular expression is searching. matches any character: b.t Above RegEx matches 'bot, 'bat and any other word of three characters which starts with b and ends in t. For example, a content rule with a location Subject line and the following regular expression:Ĭaptures any email message that has a subject line beginning with the letters abc (caret) Matches the start of the line or string of text that the regular expression is searching. These characters are categorized as follows: Characters The following table describes some of the most common special characters for use in regular expressions. See also Configure Content Compliance settings For additional instructions and guidelines, see also Guidelines for Using Regular Expressions and Examples of Regular Expressions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |