java.base/java.util.regex.PrintPattern - Regex Pattern Parser

Q

How to run "java.base/java.util.regex.PrintPattern" tool from JDK lib\modules JImage file?

✍: FYIcenter

A

"java.base/java.util.regex.PrintPattern" tool allows you to parse a regular expression pattern and print out its components.

"java.base/java.util.regex.PrintPattern" tool is supported by the jmods\jdk.base.jmod module file, which is also linked into the lib\modules JImage file in JDK 9, 10, and 11.

"java.base/java.util.regex.PrintPattern" tool using the lib\modules JImage file as described below using JDK 11 as an example:

C:\fyicenter>set JDK_HOME=\fyicenter\jdk-11.0.1

C:\fyicenter>%JDK_HOME%\bin\java --module java.base/java.util.regex.PrintPattern
   ^\D\w+(\.\w+)*[@]\w+(\.\w+)*\.[a-zA-Z]{2,4}$

   Pattern: \D\w+(\.\w+)*[@]\w+(\.\w+)*\.[a-zA-Z]{2,4}$
     0:  <Start>
     1:  <CharProperty>
     2:  <BmpCharPropertyGreedy Single "ASCII.WORD"+>
     3:  <Prolog>
     4:  <Loop  * >
     5:    <Group.head 1>
     6:      <BmpCharProperty>
     7:      <BmpCharPropertyGreedy Single "ASCII.WORD"+>
     8:    </Group.tail 1>               < (=>%d)>

         </Loop>
     9:  <BmpCharProperty>
    10:  <BmpCharPropertyGreedy Single "ASCII.WORD"+>
    11:  <Prolog>
    12:  <Loop  * >
    13:    <Group.head 2>
    14:      <BmpCharProperty>
    15:      <BmpCharPropertyGreedy Single "ASCII.WORD"+>
    16:    </Group.tail 2>                               < (=>%d)>

         </Loop>
    17:  <BmpCharProperty>
    18:  <Curly GREEDY {2, 4}>
    19:    <BmpCharProperty>
         </Curly>
    20:  <Dollar>
    21:  <END>

 

java.base/sun.security.tools.keytool.Main - "keytool" Command

java.base/com.sun.java.util.jar.pack.Driver - Pack200 Tool

Tools Supported from JDK 9+ lib\modules JImage

⇑⇑ FAQ for JDK (Java Development Kit)

2019-10-18, 274👍, 0💬