REGEXMATCH (Azure Stream Analytics)

 

Published: March 3, 2016

Updated: June 15, 2016

Applies To: Azure

Returns the starting position of the first occurrence of a pattern in a specified expression, or 0 if the pattern is not found, on all valid nvarchar(max) data types. Pattern is interpreted as single-line, case-insensitive, ECMAScript compatible regular expression.

Syntax

REGEXMATCH( <expression>, <pattern> )  

expression

An expression, typically a column that is searched for the specified pattern. Where the expression is of the nvarchar(max) data type.

pattern

A character expression that contains the regular expression to be found.

bigint

If either pattern or expression is NULL, REGEXMATCH returns NULL.

If pattern is invalid regular expression, REGEXMATCH returns 0.

SELECT TollId, EntryTime, LicensePlate, REGEXMATCH( LicensePlate, '[0-9][0-9][0-9]' ),  
FROM Input TIMESTAMP BY EntryTime  

Show: