Skip to content

Conversation

@dlarocque
Copy link
Contributor

Adds support for regexFind and regexFindAll expressions to the Pipelines API. These expressions are not yet supported in Realtime Pipeilnes / Offline.

Adds support for `regexFind` and `regexFindAll` expressions to the
Pipelines API. These expressions are not yet supported in Realtime
Pipeilnes / Offline.
/// expression to search for.
/// - Returns: A new `FunctionExpression` representing the regular expression find function.
func regexFind(_ pattern: Expression) -> FunctionExpression
/// Creates an expression that evaluates to a list of all substrings in a string expression that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add an empty line here?

.select([
Field("title").regexFind("^\\w+").as("firstWordInTitle"),
])
.select([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the second select here, the result will be the same

.select([
Field("title").regexFindAll("\\w+").as("wordsInTitle"),
])
.select([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants