Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 756 Bytes

dw-random.basicrandom.randexp.md

File metadata and controls

33 lines (19 loc) · 756 Bytes

Home > @antv/dw-random > BasicRandom > randexp

BasicRandom.randexp() method

Generate a string which match regexp

Signature:

randexp(source: string | RegExp, flag?: string): string;

Parameters

Parameter Type Description
source string | RegExp regexp or source of regexp
flag string flag(only support i)

Returns:

string

Example

 new Random().randexp('\\d{4}-\\d{8}');