# Regex ASCII character class ## Function Explains ASCII character-class syntax. ## Syntax ```bt regex(pattern, flags) ``` ## Parameters | Parameters | Type | Required | Default value | Description | | ------ | ------ | ------ | ------ | ------ | | pattern | String | No | '' | ASCII character classes such as [[:digit:]] and [[:alpha:]] can be used. | | flags | String | No | '' | Regular flags. | ## Return value | Type | Description | | ------ | ------ | | Regex | Returns a Regex object. | ## Example ```bt rule = regex('^[[:digit:]]+$', '') result = rule.test('2026') // Output: true print result ``` ## Notes - The ASCII class only matches characters in the ASCII range.