alternative function

String alternative(
  1. String pattern1,
  2. String pattern2
)

Implementation

String alternative(String pattern1, String pattern2) {
  return '(?:$pattern1|$pattern2)';
}