如何检查字符串是否包含

时间:2021-07-16 17:17:20

标签: groovy contains jenkins-groovy groovy-console groovy-eclipse

示例 1:

Message = "Invalid reference for[123] valid when association ('256') cust_ParentCompanyAssociation"

现在期望检查消息中是否存在“Invalid reference for valid when association cust_ParentCompanyAssociation”字符串。

示例 2:

 Message = "Invalid name {Empl} is not available"

现在期望检查消息中是否存在“无效名称不可用”字符串。

同样,我们有很多案例。可以像这样检查吗?

0 个答案:

没有答案