RegEx class

Definition

The RegEx class makes it possible to create expressions that leverage regular expressions.

RegEx(pattern: StrExpressionLike, single_line: bool = False, multiline: bool = False, ignore_case: bool = False)
Inheritance
builtins.object
RegEx

Remarks

The way in which the pattern specified is parsed and executed will depend on the execution mode. When executing in local or scale-up mode (such as when calling to_pandas_dataframe), the CLR engine will be used; when executing in Spark, the JVM engine will be used.

There is no time limit enforced on regular expression execution. This means that, depending on your input and pattern, it could take a long time to evaluate it.

Methods

extract_record(value: azureml.dataprep.api.expressions.Expression)

Creates an expression that will return a record with group names in the regex as keys and matching strings as values.

is_match(value: StrExpressionLike)

Creates an expression that will return whether the specified value can be matched by this regular expression.

extract_record(value: azureml.dataprep.api.expressions.Expression)

Creates an expression that will return a record with group names in the regex as keys and matching strings as values.

extract_record(value: azureml.dataprep.api.expressions.Expression)

Parameters

value

The value to match against.

Returns

An expression that returns a record with group names in the regex as keys and matching strings as values.

is_match(value: StrExpressionLike)

Creates an expression that will return whether the specified value can be matched by this regular expression.

is_match(value: StrExpressionLike)

Parameters

value

The value to match against.

Returns

An expression that returns whether the value can be matched.