code: public static Expression regexLiteral(String contents) {
      int firstSlash = contents.indexOf('/');
      int lastSlash = contents.lastIndexOf('/');
      checkArgument(
          firstSlash < lastSlash && firstSlash != -1,
          "expected regex to start with a '/' and have a second '/' near the end, got %s",
          contents);
      return Leaf.create(contents, /* isCheap= */ false);
    }
docs: Creates a code chunk representing a JavaScript regular expression literal.
  
  @param contents The regex literal (including the opening and closing slashes).