diff --git a/README.md b/README.md index 2a64ea8..640f46e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ named-regexp [![GitHub release](https://img.shields.io/github/release/tony19/named-regexp.svg?maxAge=2592000)](https://github.com/tony19/named-regexp/releases/) [![Build](https://github.com/tony19/named-regexp/actions/workflows/ci.yml/badge.svg)](https://github.com/tony19/named-regexp/actions/workflows/ci.yml) --- -This lightweight library adds support for [named capture groups](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#groupname) in Java 5/6 (and on Android). - -This is a fork of the [named-regexp](http://code.google.com/p/named-regexp) project from Google Code (currently inactive). - +This library backports [named capture groups](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#groupname) from Java 7 to Java 5/6. Usage ----- -You can use the same constructs for named capture groups from Java 7 (i.e., `(?patt)`, etc.), as in the following example: +You can use the same constructs for named capture groups from Java 7 +(i.e., `(?patt)`, etc.), as in the following example: ```java import com.google.code.regexp.Pattern; @@ -54,6 +52,10 @@ $ cd named-regexp $ mvn package ``` +To create Java 5/6 compatible bytecode, use JDK 11 or older to build this library. +The build automatically targets Java 8 (the minimum supported version) if using a +newer JDK to build. + Release ------- @@ -65,7 +67,8 @@ $ ./release.sh *Releases are deployed to https://repo1.maven.org/maven2/com/github/tony19/named-regexp/* -To release a `SNAPSHOT` (i.e., the version in `pom.xml` ends with `-SNAPSHOT`), run the following command: +To release a `SNAPSHOT` (i.e., the version in `pom.xml` ends with `-SNAPSHOT`), +run the following command: ```bash $ mvn clean deploy