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.
regex_format
: A string that represents a Regular Expression↗. This expression will be used to generate new data.
(default) '[A-Za-z]{5}'
Generate 5-character strings such as 'ABCDE'
.
<string>
Use the specified regex string to generate new values.
enforce_uniqueness
: Whether to guarantee that the created fake data will be unique
(default) False
The generated data may contain repeating values
True
The generated data will not contain any repeating values
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.
*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 Explore SDV.