I am new to Scala and I have a Seq[String] - regex of regexes and I want to iterate through this sequence and if another string, let's call it id, matches at least one of the regexes from the string, to return true.
More clear: to iterate through all of the elements of regex and if (id.matches(regex)) for at least one, then return true, otherwise false).
Can I achieve this with the .map function or creating a find function? Thanks
You can use seq.exists(regex => id.matches(regex))