List3 contains the list of element that are regular expression pattern fetched from DB. I want to print Success if any of the regex matches else Failure
val list3 = List(Test("A..C.."), Test("DF...."))
val testExpr ="DF1C13"
val s3 = list3
.filter(x => x.s.r.pattern.matcher(testExpr).matches)
.map(_ => "Success")
Actual Output
List(Success)
Expected Simple String
"Success" //Successful match
"Failure" //If match fails