# Regex.test ## Function Determine whether the text matches the current regular expression. ## Syntax ```bt regex(pattern, flags).test(text) ``` ## Parameters | Parameters | Type | Required | Default value | Description | | ------ | ------ | ------ | ------ | ------ | | text | Any | No | '' | The text to be tested will be converted into a string first when called. | ## Return value | Type | Description | | ------ | ------ | | Bool | Returns true if the match is successful, otherwise returns false. | ## Example ```bt rule = regex('^BT', '') result = rule.test('BT Lang') // Output: true print result ``` ## Notes - Regular objects are created by the system function regex(pattern, flags).