mdq.RegexMask (Transact-SQL)

Returns a binary mask that corresponds to the specified regular expression option flags. This function is in the mdq schema and is available only in the Master Data Services database.

Topic link iconTransact-SQL Syntax Conventions

Syntax

mdq.RegexMask ( cultureInvariant , explicitCapture , 
    ignoreCase , ignorePatternWhiteSpace , multiline , 
    rightToLeft , singleLine )

Arguments

The parameter names correspond to the regular expression option flags in the .NET Framework. For more information about each flag, see RegexOptions Enumeration in the .NET Framework documentation. Each flag is of type bit and accepts the values 1 (True) or 0 (False).

Note

In this function, the flag RegexOptions.Compiled flag is always set internally to True.

Return Code Values

tinyint

Remarks

mdq.RegexMask converts a set of flags into a binary value that can be used to specify the behavior of a regular expression operation. The function builds a RegexOptions mask by using the Boolean parameters. Although the RegexOptions enumerations include more options flags, mdq.RegexMask supports only the flags that are listed in this topic.

Also, to maximize performance of repeated scalar function calls in Transact-SQL queries, compilation is always enabled.

Permissions

Requires membership in the public role.

Examples

The following example returns a binary mask that represents the specified options.

USE MDM_Sample;
GO

SELECT mdq.RegexMask(1, 1, 0, 1, 0, 0, 1);

See Also

Reference

Master Data Services Functions (Transact-SQL)

Concepts

Master Data Services

Other Resources

System.Text.RegularExpressions Namespace