Lets say I have multiple patterns P1, P2, P3,, and so on. These patterns are different Regex patterns to match different variations of DATE.
How do I match these for
I would not use Patterns to match dates.
Pattern
You have DateFormat and SimpleDateFormat classes to do so.
DateFormat
SimpleDateFormat
This said, combining Patterns can be done with the alternation (|) operator on the String representation of the Pattern.
Patterns
|
String