Package org.renjin.primitives.text.regex

Examples of org.renjin.primitives.text.regex.RE.match()


    RE re = REFactory.compile(pattern,ignoreCase, perl, fixed, useBytes);
    if(value) {
      StringVector.Builder result = new StringVector.Builder();
      for(String string : x) {
        if(re.match(string)) {
          result.add(string);
        }
      }
      return result.build();
    } else {
View Full Code Here


      return result.build();
    } else {

      IntArrayVector.Builder result = new IntArrayVector.Builder(0);
      for(int i=0;i!=x.length();++i) {
        if(re.match(x.getElementAsString(i))) {
          result.add(i+1);
        }
      }
      return result.build();
    }
View Full Code Here

      boolean invert) {

    RE re = REFactory.compile(pattern, ignoreCase,  perl, fixed, useBytes);
    LogicalArrayVector.Builder result = new LogicalArrayVector.Builder();
    for(String string : x) {
      result.add( ! StringVector.isNA(string) && re.match(string ));
    }
    return result.build();
  }
 
  @Internal
View Full Code Here

    RE re = REFactory.compile(pattern, ignoreCase,  perl, fixed, useBytes);
    IntArrayVector.Builder position = IntArrayVector.Builder.withInitialCapacity(vector.length());
    IntArrayVector.Builder matchLength = IntArrayVector.Builder.withInitialCapacity(vector.length());
   
    for(String text : vector) {
      if(re.match(text)) {
        int start = re.getGroupStart(0);
        int end = re.getGroupEnd(0);
        position.add(start+1);
        matchLength.add(end-start);
      } else {
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.