Examples of captures()


Examples of oi.thekraken.grok.api.Match.captures()

    gm = g.match("r00t");
    gm.captures();
    assertEquals("{USERNAME=r00t}", gm.toMap().toString());

    gm = g.match("guest");
    gm.captures();
    assertEquals("{USERNAME=guest}", gm.toMap().toString());

    gm = g.match("guest1234");
    gm.captures();
    assertEquals("{USERNAME=guest1234}", gm.toMap().toString());
View Full Code Here

Examples of oi.thekraken.grok.api.Match.captures()

    gm = g.match("guest");
    gm.captures();
    assertEquals("{USERNAME=guest}", gm.toMap().toString());

    gm = g.match("guest1234");
    gm.captures();
    assertEquals("{USERNAME=guest1234}", gm.toMap().toString());

    gm = g.match("john doe");
    gm.captures();
    assertEquals("{USERNAME=john}", gm.toMap().toString());
View Full Code Here

Examples of oi.thekraken.grok.api.Match.captures()

    gm = g.match("guest1234");
    gm.captures();
    assertEquals("{USERNAME=guest1234}", gm.toMap().toString());

    gm = g.match("john doe");
    gm.captures();
    assertEquals("{USERNAME=john}", gm.toMap().toString());
  }

  @Test
  public void test001_username2() throws Throwable {
View Full Code Here

Examples of oi.thekraken.grok.api.Match.captures()

    g.addPatternFromFile("patterns/patterns");
    g.compile("%{USER}");

    Match gm = g.match("root");
    gm.captures();
    assertEquals("{USER=root}", gm.toMap().toString());

    gm = g.match("r00t");
    gm.captures();
    assertEquals("{USER=r00t}", gm.toMap().toString());
View Full Code Here

Examples of oi.thekraken.grok.api.Match.captures()

    Match gm = g.match("root");
    gm.captures();
    assertEquals("{USER=root}", gm.toMap().toString());

    gm = g.match("r00t");
    gm.captures();
    assertEquals("{USER=r00t}", gm.toMap().toString());

    gm = g.match("guest");
    gm.captures();
    assertEquals("{USER=guest}", gm.toMap().toString());
View Full Code Here

Examples of oi.thekraken.grok.api.Match.captures()

    gm = g.match("r00t");
    gm.captures();
    assertEquals("{USER=r00t}", gm.toMap().toString());

    gm = g.match("guest");
    gm.captures();
    assertEquals("{USER=guest}", gm.toMap().toString());

    gm = g.match("guest1234");
    gm.captures();
    assertEquals("{USER=guest1234}", gm.toMap().toString());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.