pom

regular expression extension

Лицензия

Лицензия

Группа

Группа

com.github.jeppeter
Идентификатор

Идентификатор

reext
Последняя версия

Последняя версия

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

pom
regular expression extension
Ссылка на сайт

Ссылка на сайт

https://github.com/jeppeter/reext
Система контроля версий

Система контроля версий

https://github.com/jeppeter/reext

Скачать reext

Имя Файла Размер
reext-1.0.pom
reext-1.0.jar 2 KB
reext-1.0-sources.jar 1 KB
reext-1.0-javadoc.jar 261 bytes
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.jeppeter/reext/ -->
<dependency>
    <groupId>com.github.jeppeter</groupId>
    <artifactId>reext</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jeppeter/reext/
implementation 'com.github.jeppeter:reext:1.0'
// https://jarcasting.com/artifacts/com.github.jeppeter/reext/
implementation ("com.github.jeppeter:reext:1.0")
'com.github.jeppeter:reext:jar:1.0'
<dependency org="com.github.jeppeter" name="reext" rev="1.0">
  <artifact name="reext" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jeppeter', module='reext', version='1.0')
)
libraryDependencies += "com.github.jeppeter" % "reext" % "1.0"
[com.github.jeppeter/reext "1.0"]

Зависимости

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

reext

java regular expression extension library

Maven configuration:

<dependency>
    <groupId>com.github.jeppeter</groupId>
    <artifactId>reext</artifactId>
    <version>1.0</version>
</dependency>

Gradle configuration

    compile group: 'com.github.jeppeter', name: 'reext', version: '1.0'

Split string

    import com.github.jeppeter.reext.ReExt;
    public class ReExtTest {
        public static void main(String[] args) {
            String restr="\\s+";
            String instr ="hello world";
            String[] retstr = ReExt.Split(restr,instr);
            int i;
            for (i=0;i<retstr.length;i++) {
                System.out.println(String.format("[%d]=%s",i,retstr[i]));
            }
            instr = "cc ss bb";
            retstr = ReExt.Split(restr,instr,2);
            System.out.println("split max limit");
            for (i=0;i<retstr.length;i++) {
                System.out.println(String.format("[%d]=%s",i,retstr[i]));
            }
        }
    }

result is

[0]=hello
[1]=world
split max limit
[0]=cc
[1]=ss bb

get match part

    import com.github.jeppeter.reext.ReExt;
    public class ReExtTest {
        public static void main(String[] args) {
            ReExt ext = new ReExt("([\\d]+)cc([\\d]+)");
            int maxcnt;
            int i;
            ext.FindAll("33cc55");
            maxcnt = ext.getCount(0);
            for (i=0;i<maxcnt;i++) {
                System.out.println(String.format("[0,%d]=%s",i,ext.getMatch(0,i)));
            }
            System.out.println(String.format("[-1,0]=%s",ext.getMatch(-1,0)));
            System.out.println(String.format("[0,2]=%s",ext.getMatch(0,2)));
        }
    }

result is

[0,0]=33
[0,1]=55
[-1,0]=null
[0,2]=null

Версии библиотеки

Версия
1.0