我有 2 个单独的字符串“TM_TASK”和“TM_CHECKLIST”。我如何在java中使用正则表达式来验证这两个词?java - 对于这种情况,如何在正则表达式中使用 AND 运算符?我需要验证两个字符串,而不是其中任何一个。我是正则表达式的新手。
@Pattern(value = "(?=.*TM_TASK)(?=.*TM_CHECKLIST).*", patternType = PatternType.REGEX)
@ApiOperation(value = "Fetch all instances of a specific checklist", produces = "application/json", response = ChecklistInstance.class, tags = "tasks")
@ApiImplicitParams({
@ApiImplicitParam(name = "Authorization", value = "Authorization token", required = true, dataType = "string", paramType = "header"),
@ApiImplicitParam(name = "body", value = "json document", required = true, dataType = "json", paramType = "body") })
@BodyParser.Of(BodyParser.Json.class)
public Result getChecklistInstances() {