Package org.kitesdk.morphline.shaded.com.google.code.regexp

Examples of org.kitesdk.morphline.shaded.com.google.code.regexp.Pattern.matcher()


  @Test
  public void testGrokISO8601() {
    String str = "{ dictionaryFiles : [target/test-classes/grok-dictionaries/grok-patterns] }";
    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
View Full Code Here


  public void testGrokISO8601() {
    String str = "{ dictionaryFiles : [target/test-classes/grok-dictionaries/grok-patterns] }";
    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }
View Full Code Here

    String str = "{ dictionaryFiles : [target/test-classes/grok-dictionaries/grok-patterns] }";
    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }
View Full Code Here

    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }

  @Test
View Full Code Here

    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }

  @Test
  public void testResourceLoad() {
View Full Code Here

    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }

  @Test
  public void testResourceLoad() {
    String str = "{ dictionaryResources : [grok-dictionaries/grok-patterns] }";
View Full Code Here

  @Test
  public void testResourceLoad() {
    String str = "{ dictionaryResources : [grok-dictionaries/grok-patterns] }";
    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
View Full Code Here

  public void testResourceLoad() {
    String str = "{ dictionaryResources : [grok-dictionaries/grok-patterns] }";
    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }
View Full Code Here

    String str = "{ dictionaryResources : [grok-dictionaries/grok-patterns] }";
    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }
View Full Code Here

    GrokDictionaries dicts = new GrokDictionaries(ConfigFactory.parseString(str), new Configs());
    Pattern pattern = dicts.compileExpression("%{TIMESTAMP_ISO8601:timestamp}");
    assertTrue(pattern.matcher("2007-03-01T13:00:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00Z").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01:00").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+0100").matches());
    assertTrue(pattern.matcher("2007-03-01T13:00:00+01").matches());
    assertFalse(pattern.matcher("2007-03-01T13:00:00Z+01:00").matches());
  }

}
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.