public static Matches matches(String regex) {
    return matches(regex, 0);
  }
@Test
  @Category(NeedsRunner.class)
  public void testMatches() {

    PCollection<String> output =
        p.apply(Create.of("a", "x", "y", "z")).apply(Regex.matches("[xyz]"));

    PAssert.that(output).containsInAnyOrder("x", "y", "z");
    p.run();
  }