RegExpPrototype.test(Object, Object) 方法

定义

测试在指定对象上对指定正则表达式模式进行的搜索。Tests the search for the specified regular expression pattern on the specified object.

此 API 支持产品基础结构,不能在代码中直接使用。

public:
 static bool test(System::Object ^ thisob, System::Object ^ input);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.RegExp_test)]
public static bool test (object thisob, object input);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.RegExp_test)>]
static member test : obj * obj -> bool
Public Shared Function test (thisob As Object, input As Object) As Boolean

参数

thisob
Object

此方法所作用于的对象。The object that this method is acting upon.

input
Object

要搜索的正则表达式模式。The regular expression pattern to search for.

返回

Boolean

如果搜索成功,则为 true;否则为 falsetrue if the search succeeds; otherwise, false.

属性

适用于

另请参阅