Special Capture Group References

In Wrangle transformations that support use of regex patterns, you may need to specify capture groups. A capture group is a pattern that describes a set of one or more characters that constitute a match.

This section contains information on how special capture group references are managed.

Dollar sign in replace transform

The dollar sign ($) is used as a form of escape character in the with parameter of the replace transform. This pattern identifies the replacement string.

Positive and Negative Lookaheads

In regular expressions, you can use positive and negative lookahead capture groups to capture content that is conditionally followed or not followed by a specified capture group.

TypeExample expression
Positive lookahead
Capture the letter q only when it is followed by the letter u. Letter u is not captured.
Negative lookahead
Capture the letter q when it is not followed by the letter u. Letter u is not captured.
Was this page helpful? Let us know how we did:

Send feedback about...

Google Cloud Dataprep Documentation
Need help? Visit our support page.