diff --git a/src/EthereumStatic.php b/src/EthereumStatic.php index eaac9f7..c1db6b6 100644 --- a/src/EthereumStatic.php +++ b/src/EthereumStatic.php @@ -105,8 +105,8 @@ public static function sha3($string) public static function isValidFunction($input) { // Check for function and Params. - // See: https://regex101.com/r/437FZz/4 - $regex = '/^[a-zA-Z]+[a-zA-Z0-9]*[\(]{1}(([\w\d\[\]*){1}(\,[\w\d\[\]]*[\w\d\[\]]*)*)[\)]{1}$/'; + // See: https://regex101.com/r/njQeMs/1 + $regex = '/^[a-zA-Z_]+[a-zA-Z0-9_]*[\(]{1}(([\w\d\[\]*){1}(\,[\w\d\[\]]*[\w\d\[\]]*)*)[\)]{1}$/'; if (is_string($input) && preg_match($regex, $input) === 1) { return true; }