Defines a new string-struct matching a regular expression.
Example:
const EthAddressStruct = definePattern('EthAddress', /^0x[0-9a-f]{40}$/iu); Copy
const EthAddressStruct = definePattern('EthAddress', /^0x[0-9a-f]{40}$/iu);
Type name.
Regular expression to match.
A new string-struct that matches the given pattern.
Defines a new string-struct matching a regular expression.
Example: