splitBetween method

String splitBetween(
  1. Pattern startPattern,
  2. Pattern endPattern
)

It matches the String and returns between startPattern and endPattern

Implementation

String splitBetween(Pattern startPattern, Pattern endPattern) {
  return splitAfter(startPattern).splitBefore(endPattern);
}