RegexGenerator
Last updated
Last updated
Compatibility: id
data
The RegexGenerator
is used to create structured text. When transforming the data, it simply removes the column. When reversing the transform, it recreates the structured text in the column through a regex string.
You can specify the exact regex string to use for more realistic data.
(default) '[A-Za-z]{5}'
Generate 5-character strings such as 'ABCDE'
.
<string>
Use the specified regex string to generate new values.
cardinality_rule
: Whether to guarantee that the created fake data will be unique
(default) None
Do not impose any rules. Any number of Regex values can be generated.
'unique'
The generated data should not contain any repeating values. Note: This option may limit the amount of data that you can create using the Regex
(deprecated) enforce_uniqueness
: Use the cardinality_rule
parameter instead.
generation_order
: Which order to use when generating the regexes (during the reverse transform)
(default) 'alphanumeric'
Generate the data sequentially, or in alphanumeric order. For eg. 'aaa'
, 'aab'
, 'aac'
, etc.
'scrambled'
Generate the data sequentially but then scramble it before returning the results. For large batches of data, this is an effective way to achieve the notion of randomness.
* 'random'
Generate data completely randomly. This method works even for small batches of data.
regex_format
: A string that represents a . This expression will be used to generate new data.
*SDV Enterprise Feature. This feature is available to our licensed users and is not currently in our public library. For more information, visit our page to .
Tip: If you are trying to express a basic index column with countable integers (0
, 1
, 2
, ...), we recommend using the instead of this transformer. The IndexGenerator also allows you to input a prefix and suffix to the index.